How large should my recv buffer be when calling recv in the socket library
问题 I have a few questions about the socket library in C. Here is a snippet of code I\'ll refer to in my questions. char recv_buffer[3000]; recv(socket, recv_buffer, 3000, 0); How do I decide how big to make recv_buffer? I\'m using 3000, but it\'s arbitrary. what happens if recv() receives a packet bigger than my buffer? how can I know if I have received the entire message without calling recv again and have it wait forever when there is nothing to be received? is there a way I can make a buffer