If the datagram or message is larger than the buffer supplied, the buffer is filled with the first part of the datagram and recv generates the error WSAEMSGSIZE.
For unreliable protocols (for example, UDP), the excess data is lost;
for reliable protocols, the data is retained by the service provider until it is successfully read by calling recv with a large enough buffer.