全部博文(113)
发布时间:2016-02-11 02:08:48
pthread_exit()pthread_join()#include<pthread.h>#include<stdio.h>#include<string.h>#include<stdlib.h>struct stu{int num;char name[10];};void *fun(void *arg){int i;struct stu *s;s=malloc(sizeof(struct stu));s->num=100;strcpy(s->name,"hello");for(;;){printf("pthread is running ...\n".........【阅读全文】
发布时间:2016-02-02 23:00:09
通信模型,里面用到了setsockopt函数很不理解,看了msdn这个函数讲解的特别号,就转过来了,方便以后的查阅。。closesocket(一般不会立即关闭而经历socket: setsockopt(s,SOL_SOCKET ,SO_REUSEADDR,(constchar*)&bReuseaddr,sizeof(BOOL));2.soket在调用TIME_WAIT的过程: setsockopt(s,SOL_SOCKET,SO_DONTLINGE.........【阅读全文】