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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of socket?

960


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

1408


What is the function of socket?

964


What is af_inet in socket?

876


What are the types of sockets?

970


What is the difference between SO_REUSEADDR and SO_REUSEPORT?

1845


Why do I get EPROTO from read()?

1496


Are sockets files?

929


What is active unix domain sockets?

953


What's the difference between impact sockets and regular sockets?

907


Can a socket have multiple ports?

915


Can multiple sockets use the same port?

921


What is a deep well socket?

981


What's better 6pt or 12pt sockets?

869


What is sae socket?

890