服务器代码
...
client_socket = accept(server_socket, (struct sockaddr *) &client_address, &client_address_len);
...
for (;;) {
if ( recv(client_socket, recived_buffer, MAX_MSG_LENGTH, 0) < 0 ) {
perror("ERROR leyendo el socket");
exit(1)
}
}
如果我杀了客户端,服务器会无限期地停止......
任何提示?