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?



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

Answer / 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

More Unix Socket Programming Interview Questions

Where can a get a library for programming sockets?

1 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  


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

1 Answers  


How come I get address already in use from bind()?

1 Answers  


Explain the TIME_WAIT state.

1 Answers  


After the chroot(), calls to socket() are failing. Why?

1 Answers  


How many socket connections can a server handle?

0 Answers  


What is the function of socket?

0 Answers  


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

1 Answers  


What is Mac, and how is it different from PC? Which one is better for professional users, and why

1 Answers   Evolving Systems, IBM,


of the socket? Does doing a connect() call affect the receive behaviour?

1 Answers  


Is a socket a file?

0 Answers  


Categories