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

Can a single socket port be used for multiple applications?

0 Answers  


What is difference between socket and websocket?

0 Answers  


How is a socket created?

0 Answers  


What is LILO?

2 Answers  


How do I get the port number for a given service?

1 Answers  


What exactly does SO_KEEPALIVE do?

1 Answers  


What are raw sockets?

4 Answers   Axis Technologies,


What exactly does SO_LINGER do?

1 Answers  


When should I use shutdown()?

1 Answers   Wipro,


Where is the socket located?

0 Answers  


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

1 Answers  


How can my client work through a firewall/proxy server?

1 Answers  


Categories