2020年8月2日

摘要: 1.先发送长度 2.按长度接收数据 阅读全文
posted @ 2020-08-02 14:25 lydstory 阅读(157) 评论(0) 推荐(0)
摘要: 某些具体程序要求待未发送完的数据发送出去后再关闭socket,可通过设置让程序满足要求: struct linger { u_short l_onoff; u_short l_linger; }; struct linger m_sLinger; m_sLinger.l_onoff = 1; //在 阅读全文
posted @ 2020-08-02 12:20 lydstory 阅读(338) 评论(0) 推荐(0)

导航