Reading a Socket With the Recv() Function
When using Internet sockets, the recv() function has the form:
ssize_t recv(int socket, void *buffer, size_t length, int flags).
I am concerned about what happens if a single read brings in more data than the size of the buffer. I know that for UDP sockets, any data in excess of the length parameter will be discarded. I cannot find a straight answer to the question of what happens for TCP sockets when more data arrives than the buffer length. Does anyone know?