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

Why sockets are used?

895


Why do we need socket programming?

881


Can a single socket port be used for multiple applications?

893


What is socket address?

1029


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

866


Why do we need sockets?

839


How does a socket work?

876


What is a deep well socket?

928


Is tcp or unix socket faster?

850


Where is the socket located?

902


Can a socket have multiple ports?

878


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

1621


What are the types of sockets?

934


What is the difference between a socket and a port?

883


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

1365