While making a connection using winsock we must enter the port number. How can I Know the port number of the remote computer if its just an ordinary computer.
Printable View
While making a connection using winsock we must enter the port number. How can I Know the port number of the remote computer if its just an ordinary computer.
Every IP address has 64K port numbers available. Some of these are set aside for specific programs like Ping, FTP, etc.
You can't just connect to any port. You must use the port that the program on the other side is listening to. If you are developing a special application and the server is listening for connect requests on port 5230 and you try to connect on port 6004, the server will never see the connect request.