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...


How do I properly close a socket?



How do I properly close a socket?..

Answer / chaitanya

This question is usually asked by people who try close(), because they have seen that that is what they are supposed to do, and then run netstat and see that their socket is still active. Yes, close() is the correct method. To read about the TIME_WAIT state, and why it is important, refer to ``2.7 Please explain the TIME_WAIT state.''.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Socket Programming Interview Questions

How can I be sure that UDP messages are received in order?

1 Answers  


Why does the sockets buffer fill up sooner than expected?

0 Answers  


What is difference between socket () and serversocket () class?

0 Answers  


How do I get my server to find out the clients address / host- name?

1 Answers  


Can multiple clients connect to same socket?

0 Answers  


What is a socket address?

0 Answers  


What is a deep well socket?

0 Answers  


Where is the socket located?

0 Answers  


How often should I re-transmit un-acknowleged messages?

1 Answers  


How many sockets can a port have?

0 Answers  


What are the pros/cons of select(), non-blocking I/O and SIGIO?

0 Answers  


Are unix sockets faster than tcp?

0 Answers  


Categories