Method
sendrecv
(SocketAddress local, SocketAddress remote, byte [] data, long endTime)
Source from the content-addressed store, hash-verified
| 111 | } |
| 112 | |
| 113 | static byte [] |
| 114 | sendrecv(SocketAddress local, SocketAddress remote, byte [] data, long endTime) |
| 115 | throws 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 | |
| 130 | static byte [] |
| 131 | sendrecv(SocketAddress addr, byte [] data, long endTime) throws IOException { |
Tested by
no test coverage detected