Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the TIME_WAIT state.



Explain the TIME_WAIT state...

Answer / 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

More Unix Socket Programming Interview Questions

How do Sockets Work?

1 Answers  


How can I write a multi-homed server?

0 Answers  


If bind() fails, what should I do with the socket descriptor?

1 Answers  


Why sockets are used?

0 Answers  


What is the purpose of socket?

0 Answers  


Why does it take so long to detect that the peer died?

0 Answers  


How do I properly close a socket?

1 Answers  


What exactly does SO_LINGER do?

1 Answers  


Why do I get connection refused when the server is not running?

1 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


What pieces of information make up a socket?

0 Answers  


How can I force a socket to send the data in its buffer?

0 Answers  


Categories