Is there any data missing?
Posted
by
smwikipedia
on Stack Overflow
See other posts from Stack Overflow
or by smwikipedia
Published on 2010-12-25T11:37:26Z
Indexed on
2010/12/25
11:54 UTC
Read the original article
Hit count: 226
networking
|network-programming
Hi experts,
Here is some code quoted from Douglas.E.Comer's < Computer Networks and Internets > 4th edition. This program will send back any data it received.
...
while((len = recv(conn, buff, BUFFERSIZE,0)) >0) // receive data
send(conn, buff, len, 0); // send it back
...
I am wondering, what if some data arrived when the code is executing in send(..) function, will it miss that data? Because the recv() function is not being executed. If no data is missed, where is the data kept? And by whom?
Thanks...
© Stack Overflow or respective owner