Unix/Linux网络编程(2)——一个有趣的现象

第一节咱们已经讲述了TCP的基本客户服务器模型,如今有这样一个问题:当客户端connect成功了,可是服务器在accept函数前阻塞了,会发生什么现象?web 将前面服务端代码修改一下,在accept函数之间使进程睡眠。客户端代码不用变更。缓存 /******** 头文件 *********/ #include <unistd.h> #include <sys/socket.h> #include
相关文章
相关标签/搜索