crc校验小程序,服务端

时间:2014-07-22 09:44:41
【文件属性】:

文件名称:crc校验小程序,服务端

文件大小:2KB

文件格式:C

更新时间:2014-07-22 09:44:41

crc

crc小程序,服务端 if (bind(sockfd, (struct sockaddr *) &my_addr, sizeof(struct sockaddr)) == -1) { perror( "bind error"); exit(1); } if (listen(sockfd, BACKLOG) == -1) { perror( "listen error"); exit(1); } while(1) { //sin_size = sizeof(struct sockaddr_in); client_fd = -1; while(client_fd== -1) { client_fd = accept(sockfd, NULL, NULL); } bytesRecv = recv(client_fd, recvbuf, MAXDATASIZE, 0); printf("RECEIVED %d bytes finished\n",bytesRecv); break; }


网友评论