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 |
What is socket address with example?
What is af_inet in socket?
What is socket programming in java?
Is tcp or unix socket faster?
What's the difference between impact sockets and regular sockets?
How do I properly close a socket?
How can my client work through a firewall/proxy server?
Are unix sockets faster than tcp?
Why do not my sockets close?
What is the difference between a socket and a port?
Whats the difference between select() and poll()?
How come select says there is data, but read returns zero?