MCPcopy Create free account
hub / github.com/ReadyTalk/avian / SocketOutputStream

Method SocketOutputStream

test/extra/SendFile.java:16–22  ·  view source on GitHub ↗
(String host, int port)

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 5

openMethod · 0.95
openMethod · 0.95
registerMethod · 0.80
connectMethod · 0.45
configureBlockingMethod · 0.45

Tested by

no test coverage detected