/** * Creates a UDP transport with an arbitrary local port on all local interfaces. * * @throws IOException if socket binding fails. */ public DefaultUdpTransportMapping() throws IOException { super(new UdpAddress(InetAddress.getLocalHost(), 0)); socket = new DatagramSocket(udpAddress.getPort()); }
/** * Creates a default TCP transport mapping with the server for incoming messages disabled. * * @throws UnknownHostException * @throws IOException on failure of binding a local port. */ public DefaultTcpTransportMapping() throws UnknownHostException, IOException { super(new TcpAddress(InetAddress.getLocalHost(), 0)); }