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

Method createConnection

src/main/java/core/packetproxy/ProxyHttp.java:201–210  ·  view source on GitHub ↗
(Endpoint client, Endpoint server, byte[] input_data)

Source from the content-addressed store, hash-verified

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}

Callers 1

onChunkReceivedMethod · 0.95

Calls 8

getInstanceMethod · 0.95
createDuplexSyncMethod · 0.95
getEncoderMethod · 0.95
sendMethod · 0.95
receiveMethod · 0.95
closeMethod · 0.95
queryByAddressMethod · 0.80
getAddressMethod · 0.65

Tested by

no test coverage detected