The GetClientPort method returns the remote port number that
the client is bound to. Note that this is not the port number that the
server is using to listen for connections, it is the port number that
the client is bound to on the remote host. Typically this is an
ephemeral port, either in the range of 1025 through 5000, or greater
than 32768, depending on the client operating system.
If this method is called within the OnAccept event handler,
providing the server socket handle as the hSocket parameter
will return the port number of the client that is attempting to
establish the connection.
It is not recommended that you use the client port number for
anything other than informational and logging purposes. Do not make
any assumptions about the specific port number or range of port
numbers that a client is using when establishing a connection to the
server. The ephemeral port number that a client is bound to can vary
based on the client operating system.