I am using TCP protocol for sending data over the network. Can I be sure that after the send() call is over, the data is read by the other side? If not is there a way to achieve this?
The socket is not marked as blocking.
Thanks..
Thanks, it's a very valuable information for me. ESPN: ESPNEWS: Send Your Questions! - SportsNation:: ESPNEWS has a roster full of experts and analysts just waiting to answer your questions and hear your feedback about every sport you can imagine. http://sports.espn.go.com/chat/sportsnation/story?page=espnewsmailformHOME | sock.send question - LinuxQuestions.org:: 9 posts - Last post: Nov 27is it the sock.send only run once? that means even we do the for loops, the sock .send only run once then it will terminate? hope my question http://www.linuxquestions.org/questions/programming-9/sock.send-question-686221/HOME |
You have no control over WHEN precisely TCP/IP will decide
to deliver your data to the other side... So, no, you can't ever
really be sure that any data you have sent has actually been
read by the other side, unless you design something into your
communication protocol to provide such notification... (Ie: have
each side send some kind of user-level ACK message after it
receives a message...) Well, actually, I take that back... I think
you could also get away with simply monitoring the amount of
unsent data in your send queue (via SIOCOUTQ/TIOCOUTQ
ioctl())... When that drops to zero, then yes, you can be sure
that all of the data has been received by the remote system...
HOWEVER, that doesn't necessarily mean it's been read by
the process on that remote system yet... It just means the OS
has successfully received it, and it's there waiting for the process
to read it, when it's ready to...
Yes. when is all ok, data was received by remote host. If not, send return error on next send usage.
check information how tcpip work. /packet scheme/
hope this help.
How much does getting a small tattoo on your hip/stomach hurt?
Do anyone else have an itchy anus? ?
|