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 should I choose a port number for my server?



How should I choose a port number for my server?..

Answer / chaitanya

The list of registered port assignments can be found in STD 2 or RFC 1700. Choose one that isn't already registered, and isn't in /etc/services on your system. It is also a good idea to let users customize the port number in case of conflicts with other un- registered port numbers in other servers. The best way of doing this is hardcoding a service name, and using getservbyname() to lookup the actual port number. This method allows users to change the port your server binds to by simply editing the /etc/services file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Socket Programming Interview Questions

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

1 Answers  


How can I find the full hostname (FQDN) of the system I am running on?

1 Answers  


What's better 6pt or 12pt sockets?

0 Answers  


When will my application receive SIGPIPE?

1 Answers  


What is a socket connection?

0 Answers  


Explain the TIME_WAIT state.

1 Answers  


How does a socket work?

0 Answers  


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

0 Answers  


What exactly is a socket?

0 Answers  


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

1 Answers  


How many sockets can a cpu have?

0 Answers  


How is a socket created?

0 Answers  


Categories