When any client program communicates with server client uses an ephemeral port number to communicate with the server on server port. Is there any way to control/Select the client ephemeral port number in Java.
When any client program communicates with server client uses an ephemeral port number to
Share
Yes, you specify the local address / portnumber:
http://download.oracle.com/javase/6/docs/api/java/net/Socket.html#Socket%28java.net.InetAddress,%20int,%20java.net.InetAddress,%20int%29