Method
sendrecv
(SocketAddress local, SocketAddress remote, byte [] data, int max,
long endTime)
Source from the content-addressed store, hash-verified
| 140 | } |
| 141 | |
| 142 | static byte [] |
| 143 | sendrecv(SocketAddress local, SocketAddress remote, byte [] data, int max, |
| 144 | long endTime) |
| 145 | throws IOException |
| 146 | { |
| 147 | UDPClient client = new UDPClient(endTime); |
| 148 | try { |
| 149 | client.bind(local); |
| 150 | client.connect(remote); |
| 151 | client.send(data); |
| 152 | return client.recv(max); |
| 153 | } |
| 154 | finally { |
| 155 | client.cleanup(); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | static byte [] |
| 160 | sendrecv(SocketAddress addr, byte [] data, int max, long endTime) |
Tested by
no test coverage detected