工作中用到的别人的测试代码,代码当然自己也可以写,看懂了,然后按照自己的需求来改,效率更高
1. Linux 线程同步的三种方法 -幸运啤酒盖-ChinaUnix博客
2. pthread_getspecific()–读线程私有数据
3. linux poll例子_manyhappyreturn_新浪博客 --- poll 的例子 - zqt520的专栏 - 博客频道 - CSDN.NET
4. 网络编程api beej-zhtw.netdpi.net/09-man-manual/9-17-poll / beej-zhcn.netdpi.net/05-system-call-or-bust/5-7-send
5. C: Linux Socket Programming
7. fork fork/fork.c at master · luisbajana/fork · GitHub
8. libcurl - source code examples
9. linux设置套接字缓冲区的大小 - liangxanhai的专栏 - 博客频道 - CSDN.NET setsockopt getsockopt
c - SO_SNDBUF and SO_RCVBUF on Linux sockets - Stack Overflow
c - Understanding set/getsockopt SO_SNDBUF - Stack Overflow
10. stackoverflow.com/questions/4181784/how-to-set-socket-timeout-in-c-when-making-multiple-connections
structtimeval timeout;timeout.tv_sec=10;timeout.tv_usec=0;if(setsockopt(sockfd,SOL_SOCKET,SO_RCVTIMEO,(char*)&timeout,sizeof(timeout))<0)error("setsockopt failed\n");if(setsockopt(sockfd,SOL_SOCKET,SO_SNDTIMEO,(char*)&timeout,sizeof(timeout))<0)error("setsockopt failed\n");