freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)設(shè)計(jì)-基于linux下網(wǎng)絡(luò)聊天室的設(shè)計(jì)與實(shí)現(xiàn)(參考版)

2024-12-05 02:13本頁(yè)面
  

【正文】 } 致謝 在我畢業(yè)論文開(kāi)題、調(diào)查、研究和撰寫(xiě)過(guò)程中,岳淼老師給予我耐心、細(xì)致和全面的幫助 , 這個(gè)設(shè)計(jì)需要用到的理論很多 ,幾乎是我學(xué)習(xí)基于 到 Linux下 c 編程的知識(shí)的一個(gè)集合體 ,這同時(shí)也積累了我近幾個(gè)月的編程經(jīng)驗(yàn)。 } USER_LIST last_p(USER_LIST head) { while(headnext!=NULL) head=headnext。 if (wc == 1) err_sys(server send xx) pi=pinext。 } while(pi!=NULL) { buf[1]=(char)pinumber。39。 head=headnext。 30 } */ strcat(buf,buf_c)。 /*p_addr=i_ntoa(headsin_addr)。39。39。 char buf_c[2]={0}。 char count=0。 } int send_list(USER_LIST head) { int wc。 close(newfd)。 if (wc == 1) { //delete_pointer(find_user(head,newfd), head)。 strcat(buffer,buf )。 buf[0]=39。 strcat(buffer, i_ntoa(headsin_addr))。 buffer[1]=39。039。039。 close(newfd)。 if (wc == 1) 29 { //delete_pointer(find_user(head,newfd), head)。amp。)) head=headnext。headnumber!=(buf[0]39。 while(head!=NULLamp。 } int forward(USER_LIST head,char *buf,int newfd) { int wc。 if(head==NULL) return 0。amp。 return NULL。 headnext=del_pnext。headnextnumber!=num) head=headnext。 } while(headnext!=NULLamp。 head=NULL。 } if(headnumber==num) { if(headnext!=NULL) del_p=headnext。 if(num==0) { printf(free err\n)。 28 return 0。 pointersin_addr=sin_add。 } int write_list(USER_LIST pointer,int num,int sockfd,struct in_addr sin_add) { pointernumber=num。 head=(USER_LIST)malloc(user_size)。 } return 0。) { printf(客戶端不存在 \n)。amp。amp。39。 } else if(buf[0]==39。) buf++。 if(*buf==39。*buf!=0) { printf(%c,*buf++)。amp。 while(*buf!=39。 buf++。 printf( 在線客戶端號(hào) IP地址 \n)。39。 } 附錄 C: include int pri_rec(char *buf) { int count。 }//switch(ret) }//while(RUNNING) shutdown(sockfd, SHUT_RD | SHUT_WR)。 } }//if (FD_ISSET(sockfd, amp。\039。readfds)。 err_sys(client recv) } else if(rc == 0) { close(sockfd)。 rc = recv(sockfd, buffer_r, BUFF_SIZE, 0)。\039。readfds)) /**************Client read****************/ if (FD_ISSET(sockfd, amp。 if (wc == 1) { close(sockfd)。 fgets(buffer_w, BUFF_SIZE, stdin)。\039。 default: /**************Client write****************/ if (FD_ISSET(STDIN_FILENO, amp。 case 0://select time out //fprintf(stderr, server time out\n)。 close(sockfd)。 switch(ret) { case 1://select error if (errno == EINTR) { goto select_label。readfds, NULL, NULL, amp。readfds)。readfds)。readfds)。 = 0。 while(RUNNING) { select_label: 25 maxfd = ((maxfd sockfd) ? maxfd : sockfd)。 int maxfd = sockfd。 } } fd_set readfds。 } else { fprintf(stderr, Client is trying to connect...\n)。 fprintf(stderr, Client is trying to connect...\n)。 while(connect(sockfd, (struct sockaddr *)amp。 = i_addr(server_ip)。 = AF_INET。 bzero(amp。 } sockfd = socket(AF_INET, SOCK_STREAM, 0)。 break。i39。 break。p39。 } int c = 1。 if(argc != 5) { fprintf(stderr, Usage:%s p server_port i server_ip\n, argv[0])。\039。 int server_port。 char buffer_r[BUFF_SIZE], buffer_w[BUFF_SIZE]。 struct sockaddr_in server_addr。 exit(EXIT_SUCCESS)。 pthread_attr_destroy(amp。 } else { fprintf(stdout, Master thread[%u] which belongs to process[%d] creates a new slave thread[%u], pthread_self(), getpid(), pt)。 fprintf(stderr, Master thread[%u] created a new thread failurefully\n, 23 pthread_self())。 send_list( head)。 if (ret != 0) { USER_LIST delet=delete_pointer(find_user(head,newfd), head)。attr, start_routine, (void *)amp。 /***************Create a new slave thread**********************/ ret = pthread_create(amp。 write_list(next_p,num,newfd,)。 next_pnext=creat_pointer()。 write_list(next_p,num,newfd,)。 } if(head==NULL) { next_p=creat_pointer()。 } else { close(sockfd)。addrlen)。 newfd = accept(sockfd, (struct sockaddr *)amp。 22 bzero(amp。 while (RUNNING) { printf(\nParent process[%d] whose master thread is %u is waiting for a new connection...\n, getpid(), pthread_self())。 int num=1。 pthread_attr_setscope(amp。 pthread_attr_setdetachstate(amp。 pthread_attr_init(amp。 pthread_attr_t attr。 struct sockaddr_in client_addr。 err_sys(server bind) } if (listen(sockfd, BACK_LOG) == 1)//closedlisten { shutdown(sockfd, SHUT_RD | SHUT_WR)。server_addr, addrlen) == 1) { close(sockfd)。//INADDR_ANY = htons(atoi(argv[2]))。 = AF_INET。 bzero(amp。i, sizeof(i))。//closed 21 if (sockfd == 1) { err_sys(server socket) } int i = 1。 exit(EXIT_FAILURE)。 socklen_t addrlen = addr_size。 pthread_exit(NULL)。 } }//if (FD_ISSET(newfd, amp。\039。readfds)。 close(newfd)。 if(delet!=NULL) head=delet。 if (rc == 1) { close(newfd)。, BUFF_SIZE)。readfds)) { memset(buffer_r, 39。 continue。 close(newfd)。 if(delet!=NULL) head=delet。 if (ret == 1) { if (errno == EINTR) { goto select_label。readfds, NULL, NULL, amp。readfds)。readfds)。readfds)。 = 0。 while (RUNNING) { select_label: maxfd = ((maxfd newfd) ? maxfd : newfd)。 char buffer_r[BUFF_SIZE]。 int maxfd = newfd。 struct timeval ts。 參考文獻(xiàn): [1] :協(xié)議 TCP/IP IIIustrated Volume 1: The Protocols. [2] Steven, Bill Fenner, Andrew 卷 2. [3]Kurt Wall. GNU/linux編程指南 . [4]嚴(yán)蔚敏,吳偉明 .數(shù)據(jù)結(jié)構(gòu)( C 語(yǔ)言版) . [5]譚浩強(qiáng) .C 語(yǔ)言程序設(shè)計(jì) . [6]Kenh 和指針 . [7]Mendel shell 編程從入門(mén)到精通 . 附錄 該附錄主要顯示的時(shí),該系統(tǒng)的源代碼 : 附錄 A:
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1