(Endpoint client, Endpoint server, byte[] input_data)
| 199 | } |
| 200 | |
| 201 | private byte[] createConnection(Endpoint client, Endpoint server, byte[] input_data) throws Exception { |
| 202 | Server s = Servers.getInstance().queryByAddress(server.getAddress()); |
| 203 | DuplexSync duplex = (s != null) |
| 204 | ? DuplexFactory.createDuplexSync(client, server, s.getEncoder(), "http/1.1") |
| 205 | : DuplexFactory.createDuplexSync(client, server, "HTTP", "http/1.1"); |
| 206 | duplex.send(input_data); |
| 207 | byte[] output_data = duplex.receive(); |
| 208 | duplex.close(); |
| 209 | return output_data; |
| 210 | } |
| 211 | } |
no test coverage detected