Answer Posted / 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 View All Answers
What are the pros/cons of select(), non-blocking I/O and SIGIO?
Why do we need socket programming?
How do I convert a string into an internet address?
What is sae socket?
Are unix sockets faster than tcp?
Is tcp or unix socket faster?
How do unix sockets work?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
What is a socket file?
How does unix socket work?
How is a socket created?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?
What are the types of sockets?
Why do we need sockets?
How to find other end of unix socket connection?