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

Method bind

src/main/java/core/org/xbill/DNS/UDPClient.java:84–100  ·  view source on GitHub ↗
(SocketAddress addr)

Source from the content-addressed store, hash-verified

82}
83
84void
85bind(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
102void
103connect(SocketAddress addr) throws IOException {

Callers 3

connectMethod · 0.95
sendrecvMethod · 0.95
bind_randomMethod · 0.45

Calls 2

bind_randomMethod · 0.95
getPortMethod · 0.45

Tested by

no test coverage detected