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

正文內(nèi)容

linux基于socket下的簡單聊天室-文庫吧資料

2025-06-25 14:13本頁面
  

【正文】 (str[0] != 39。$39。 memset(str,0,strlen(str))。 // printf(agree :%s,%s,%s\n,)。 send(sockfd,amp。 savefilefd = 1。 } }while(savefilefd == 1)。 savefilefd = open(savefilename,O_RDWR|O_CREAT|O_EXCL,0666)。 printf(請(qǐng)輸入保存的文件名,文件將保存在當(dāng)前目錄下!\n)。 (savefilefd == 0)) { char savefilename[20]。 if ((strcmp(,agree) == 0) amp。amp。 continue。a,sizeof(a),0)。 printf(標(biāo)志信息為:%s\n,)。$39。 strcpy(buf,)。 memset(str,0,strlen(str))。 strcpy(,all)。sockfd)。 pthread_create(amp。 printf(接到服務(wù)器發(fā)來的信息:%s\n,buf)。 printf(正在等待服務(wù)器應(yīng)答...\n)。 send(sockfd,amp。 //[3] = 39。 scanf(%s,)。 scanf(%s,)。 } if(do_number ==1) { int n = 3。server_addr,sizeof(struct sockaddr)) == 1) { printf(與服務(wù)器無響應(yīng),請(qǐng)隔一段時(shí)間再連接\n)。 = htons(port)。 = AF_INET。 } bzero(amp。 printf(程序已退出!\n)。 gets(str)。 scanf(%d,amp。amp。amp。 gets(str)。 scanf(%d,amp。 printf(| |\n)。 printf(|\\t\t |\n)。 printf(| input a number to work |\n)。 printf(\n)。 exit(1)。 } port = atoi(argv[2])。 if(argc != 3) { printf(請(qǐng)輸入服務(wù)器IP和端口\n)。 char buf[MAXLEN]。 struct message a。 int port。msg,sizeof(struct msq),0)。 } write(fd,str,strlen(str))。 sprintf(str,%s%s發(fā)來的私聊消息:%s\n\n,ctime(amp。 } else { time (amp。 n=write(savefilefd,)。amp。 // printf( = %s\n,)。 continue。 close(savefilefd)。 } else if(strcmp(,transf) == 0) { int n。 savefilefd = 0。 } else { strcpy(filefromname,)。 close(savefilefd)。 savefilefd = 1。 } else if(strcmp(,disagree) == 0) { printf(對(duì)方拒絕接收文件\n)。 //創(chuàng)建線程發(fā)送文件 pthread_create(amp。 } else if (strcmp(,trans) == 0) { pthread_t pid。timep),)。timep)。 continue。 printf(%s服務(wù)器發(fā)給所有人:%s\n\n,ctime(amp。 } else if (strcmp(,sermsg) == 0) { time (amp。 sprintf(str,%s%s發(fā)給所有人:%s\n\n,ctime(amp。 } else if (strcmp(,all) == 0) { time (amp。 close(connfd)。 if(nread == 0) { printf(與服務(wù)器斷開了連接\n)。 while(1) { nread = recv(connfd,amp。 } = getpid()。 if((qid = msgget(2222,IPC_CREAT|0666)) == 1) { printf(創(chuàng)建消息隊(duì)列失敗\n)。 exit(1)。 struct msq msg。 struct message recvmsg。 char buf[1024]。 }void handlerecvmsg(int *sockfd){ int connfd = *sockfd。 close(savefilefd)。 break。filedata,sizeof(struct message),0)。 } else if ( 0) { printf( = %s\n,)。 if ( == 0) { printf(文件傳輸完畢\n)。 strcpy(,transf)。 do { memset(,0,sizeof())。 }void handlesendfile(void){ struct message filedata。 else right[m] = 39。 if(j m) right[ji1] = 39。 } left[i] = 39。) break。j++) { if(str[j] == 39。 } } for(j = i+1 。 k i 。 } else { memset(left,0,strlen(left))。i++) { if(str[i] == c) break。 for(i = 0 。 raise(SIGQUIT)。 } } close(savefilefd)。 if(qid 0) { if((msgctl(qid,IPC_RMID,NULL))0) { printf(消息隊(duì)列無法關(guān)閉\n)。void handleQuit(int signal_no){ if(fd 0) close(fd)。int qid = 1,fd = 1,sockfd,savefilefd=1。 char msg_text[5]。}。 int size。 }*//************/include include include include sys/include netinet/include include sys/include sys/include include include include sys/include include sys/define MAXLEN 1024struct message{ char flag[15]。 // printf(%d\n,login_check(amp。 printf(%d\n,reg_check(amp。printf(input mima:\n)。printf(input name:\n)。 return 1。 } }while(read_size0)。(strcmp(recievemsgmsg,)==0)) { close(fd)。 } if((strcmp(recievemsgname,)==0)amp。 read_size!=0) { close(fd)。 } if(read_size != sizeof(struct message) amp。 close(fd)。 } do { if((read_size=read(fd,amp。 if((fd=open(,O_RDONLY))0) { perror(open)。 struct message cmpmsg。 return 0。 } printf(write file success\n)。 lseek(fd,write_size,SEEK_CUR)。 return 2。 if((write_size=write(fd,recievemsg,sizeof(struct message)))0) { perror(write)。 return 1。 return 2。amp。 return 2。cmpmsg,sizeof(cmpmsg))) 0) { perror(read)。 return 2。 } if((fd=open(,O_RDWR|O_CREAT|O_APPEND,0666))0) { perror(open)。 } if(strcmp(recievemsgname,login)==0) { return 1。 } if(strc
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1