(待补充)
问题:服务器在台湾 客户端在国内网络 在延迟较高 网络包大的情况下 出现踢掉连接的情况 原因是没处理errno为EAGAIN的情况 直接断开了链接
网络层 send返回值
errno DAGAIN
DWOULDBLOCK
https://www.ioplex.com/~miallen/errcmp.html
修改后如下
1 | int do_send(const char *buf, int length) |
(待补充)
问题:服务器在台湾 客户端在国内网络 在延迟较高 网络包大的情况下 出现踢掉连接的情况 原因是没处理errno为EAGAIN的情况 直接断开了链接
网络层 send返回值
errno DAGAIN
DWOULDBLOCK
https://www.ioplex.com/~miallen/errcmp.html
修改后如下
1 | int do_send(const char *buf, int length) |