I have a client that sends data to a server with two consecutive send calls:
send(_sockfd,msg,150,0); send(_sockfd,msg,150,0);
and the server receives when the first send call was sent (let's say I use select):
recv(_sockfd,buf,700,0);
Notice that the buffer that I get is much larger.
my question is: is there any chance that buf will contain both msgs? Do I need 2 calls to recv () to receive both messages?
Thank you!
TCP - , . // . , , , . RFC 793 - - /.
TCP
UDP. @R.. UDP ( : message). ( , MTU) TCP? , .
UDP
message
, () one send == one recv. . , .
one send == one recv
, a send a recv , UDP. SCTP. SCTP - .
send
recv
SCTP
TCP, . :
, , . , .
, , , . TCP . UDP , , /.
, . TCP/IP. send recv , , .