Answer Posted / chaitanya
Remember that TCP guarantees all data transmitted will be delivered, if at all possible. When you close a socket, the server goes into a TIME_WAIT state, just to be really really sure that all the data has gone through. When a socket is closed, both sides agree by sending messages to each other that they will send no more data. This, it seemed to me was good enough, and after the handshaking is done, the socket should be closed. The problem is two-fold. First, there is no way to be sure that the last ack was communicated successfully. Second, there may be "wandering duplicates" left on the net that must be dealt with if they are delivered.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a sae socket?
Why sockets are used?
How is a socket created?
What is the function of socket?
What's the difference between a socket and a port?
How can I force a socket to send the data in its buffer?
Why do we need socket programming?
Why does it take so long to detect that the peer died?
Why do we need sockets?
How many sockets can a port have?
What are the types of sockets?
Why does the sockets buffer fill up sooner than expected?
How can I tell when a socket is closed on the other end?
Is tcp or unix socket faster?
What's the difference between impact sockets and regular sockets?