/*阻塞等待客户端连接请求*/ int newfd = -1; newfd = accept(fd,NULL,NULL); if(newfd < 0); { perror("accept"); exit(1); }