/* CMosh — Swift 可 import 的 mosh 客户端入口头(库符号来自 MoshCore.xcframework)。 * 对应 vendor/mosh/src/frontend/moshiosbridge.h,保持签名一致。 * mosh_main 是阻塞式主循环:读 f_in(用户输入字节)、写 f_out(终端输出字节), * 经 UDP 连 ip:port(mosh SSP,AES-128-OCB),window_size 供 SIGWINCH resize。 */ #ifndef CMOSH_MOSHIOSBRIDGE_H #define CMOSH_MOSHIOSBRIDGE_H #include #include #if __cplusplus extern "C" #endif int mosh_main(FILE *f_in, FILE *f_out, struct winsize *window_size, const char *ip, const char *port, const char *key, const char *predict_mode); /* M3:最近一次收到新服务器状态的 mosh 单调时刻(ms);0=从未。前台恢复判定用。 */ #if __cplusplus extern "C" #endif unsigned long long mosh_last_heard_ms(void); #endif /* CMOSH_MOSHIOSBRIDGE_H */