(SocketAddress addr)
| 82 | } |
| 83 | |
| 84 | void |
| 85 | bind(SocketAddress addr) throws IOException { |
| 86 | if (addr == null || |
| 87 | (addr instanceof InetSocketAddress && |
| 88 | ((InetSocketAddress)addr).getPort() == 0)) |
| 89 | { |
| 90 | bind_random((InetSocketAddress) addr); |
| 91 | if (bound) |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | if (addr != null) { |
| 96 | DatagramChannel channel = (DatagramChannel) key.channel(); |
| 97 | channel.socket().bind(addr); |
| 98 | bound = true; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void |
| 103 | connect(SocketAddress addr) throws IOException { |
no test coverage detected