摘要:
1、server端close之后,client端write,导致server端发送RST(服务器关闭套接字):对方已经关闭或者异常终止,但是client端,不知道,这个成为半打开当server端close套接字的时候,假设此时server端的接受缓冲区没有数据了。则close发送的是FIN分节,cl... 阅读全文
摘要:
当client,调用read(socketfd,buffer,n)时,返回0的情况:1、server端调用了close(soketfd)函数2、server调用了close(fd,SHUT_WR),关闭server端的写连接,半关闭关于close 和shutdown的过程一.void close(f... 阅读全文
摘要:
typedef struct task_node { void *arg; /* fun arg. */ void *(*fun) (void *); /* the real work of the task. */ pthread_t ti... 阅读全文