Code example for DatagramSocket
* @return The port number of the open socket on the local host used
* for the connection.
public int getLocalPort()
* Returns the local address to which the client's socket is bound.
* If you call this method when the client socket is not open, a
* NullPointerException is thrown.
* @return The local address to which the client's socket is bound.
public InetAddress getLocalAddress()