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

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

Answer Posted / chaitanya

The connect() call will only block while it is waiting to establish a connection. When there is no server waiting at the other end, it gets notified that the connection can not be established, and gives up with the error message you see. This is a good thing, since if it were not the case clients might wait for ever for a service which just doesn't exist. Users would think that they were only waiting for the connection to be established, and then after a while give up, muttering something about crummy software under their breath.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do I get EPROTO from read()?

1438


What exactly is a socket?

922


What is a sae socket?

922


What's better 6pt or 12pt sockets?

814


Why do we need sockets?

820


What is the purpose of socket?

912


How can I tell when a socket is closed on the other end?

1343


How many sockets can a cpu have?

838


What is socket address?

1016


Are sockets files?

874


What is difference between socket and websocket?

893


How does unix socket work?

904


How can I write a multi-homed server?

1639


How can I set the timeout for the connect() system call?

1506


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

854