#pragma once #include #include /* * 看门狗分片等待:单次 net_recv_to 等待片长上限。须显著小于看门狗抽样窗 * (100ms)的容错窗口(8 窗 = 800ms),200ms 留足余量;语义上仅把一次长 * 等待拆成多次短等待,总预算不变(与 time_sync.c 同款,见看门狗设计说明 * §4.4 长耗时白名单)。2026-10-02 台架:FTP 心跳缺失 + 30s 不分片等待 → * IWDG 复位循环,本分片为修复的一部分。 */ #define LFTPD_WAIT_SLICE_MS 200U int lftpd_inet_listen(int port); int lftpd_inet_get_socket_port(int socket); int lftpd_inet_accept(int socket); int lftpd_inet_accept_timeout(int socket, int timeout_ms); int lftpd_inet_read_line(int socket, char *buffer, size_t buffer_len); int lftpd_inet_write_string(int socket, const char *message); int lftpd_inet_write(int socket, const void *buf, int len); int lftpd_inet_read(int socket, void *buf, int len); int lftpd_inet_close(int socket);