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

Method sendrecv

src/main/java/core/org/xbill/DNS/TCPClient.java:113–128  ·  view source on GitHub ↗
(SocketAddress local, SocketAddress remote, byte [] data, long endTime)

Source from the content-addressed store, hash-verified

111}
112
113static byte []
114sendrecv(SocketAddress local, SocketAddress remote, byte [] data, long endTime)
115throws IOException
116{
117 TCPClient client = new TCPClient(endTime);
118 try {
119 if (local != null)
120 client.bind(local);
121 client.connect(remote);
122 client.send(data);
123 return client.recv();
124 }
125 finally {
126 client.cleanup();
127 }
128}
129
130static byte []
131sendrecv(SocketAddress addr, byte [] data, long endTime) throws IOException {

Callers 1

sendMethod · 0.95

Calls 5

bindMethod · 0.95
connectMethod · 0.95
sendMethod · 0.95
recvMethod · 0.95
cleanupMethod · 0.80

Tested by

no test coverage detected