How large should my recv buffer be when calling recv in the socket library
The answers to these questions vary depending on whether you are using a stream socket (SOCK_STREAM) or a datagram socket (SOCK_DGRAM) – within TCP/IP, the former corresponds to TCP and the latter to UDP. How do you know how big to make the buffer passed to recv()? SOCK_STREAM: It doesn’t really matter too much. If … Read more