MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / connect

Method connect

src/main/java/core/org/xbill/DNS/TCPClient.java:23–39  ·  view source on GitHub ↗
(SocketAddress addr)

Source from the content-addressed store, hash-verified

21}
22
23void
24connect(SocketAddress addr) throws IOException {
25 SocketChannel channel = (SocketChannel) key.channel();
26 if (channel.connect(addr))
27 return;
28 key.interestOps(SelectionKey.OP_CONNECT);
29 try {
30 while (!channel.finishConnect()) {
31 if (!key.isConnectable())
32 blockUntil(key, endTime);
33 }
34 }
35 finally {
36 if (key.isValid())
37 key.interestOps(0);
38 }
39}
40
41void
42send(byte [] data) throws IOException {

Callers 5

sendrecvMethod · 0.95
runMethod · 0.45
SocketEndpointMethod · 0.45
openConnectionMethod · 0.45

Calls 1

blockUntilMethod · 0.80

Tested by

no test coverage detected