int recvfrom(SOCKET socket,
char * buffer,
int buflen,
int flags,
struct sockaddr * from,
int * fromlen);
I know that recvfrom()
returns immediately after it reads buflen
from socket. My questions here are -
What if i have requested
buflen
of 2000 and a single packet in the socket queue is of size 2400?What if i have requested
buflen
of 2000 and a single packet in the socket queue is of size 1400?Are the answers for above questions apply same for both TCP and UDP? If not, whats the difference.
Appreciate the reply in advance.