(String host, int port)
| 14 | private final SocketChannel channel; |
| 15 | private final Selector selector; |
| 16 | public SocketOutputStream(String host, int port) throws Exception { |
| 17 | channel = SocketChannel.open(); |
| 18 | channel.connect(new InetSocketAddress(host, port)); |
| 19 | channel.configureBlocking(false); |
| 20 | selector = Selector.open(); |
| 21 | channel.register(selector, SelectionKey.OP_WRITE, null); |
| 22 | } |
| 23 | |
| 24 | public void close() throws IOException { |
| 25 | channel.close(); |
nothing calls this directly
no test coverage detected