public static Address from ( int port ) { try { InetAddress address = getLocalAddress ( ) ; return new Address ( address . getHostName ( ) , port ) ; } catch ( UnknownHostException e ) { throw new IllegalArgumentException ( "Failed to locate host" , e ) ; } }
Returns an address for the local host and the given port .