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

Method run

src/main/java/core/packetproxy/ProxyQuicForward.java:36–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 @Override
37 public void run() {
38 try {
39
40 while (true) {
41
42 ClientConnection clientConnection = this.clientConnections.accept();
43 log("accept");
44
45 String serverName = this.listen_info.getServer().getIp();
46 log("[QUIC-forward!] %s", serverName);
47
48 ServerConnection serverConnection = new ServerConnection(ConnectionIdPair.generateRandom(), serverName,
49 this.listen_info.getPort());
50
51 DuplexAsync duplex = DuplexFactory.createDuplexAsync(clientConnection, serverConnection,
52 this.listen_info.getServer().getEncoder());
53
54 duplex.start();
55 DuplexManager.getInstance().registerDuplex(duplex);
56 }
57 } catch (Exception e) {
58
59 errWithStackTrace(e);
60 }
61 }
62
63 public void close() throws Exception {
64 this.clientConnections.close();

Callers

nothing calls this directly

Calls 12

generateRandomMethod · 0.95
createDuplexAsyncMethod · 0.95
startMethod · 0.95
getInstanceMethod · 0.95
registerDuplexMethod · 0.80
errWithStackTraceMethod · 0.80
acceptMethod · 0.65
logMethod · 0.65
getEncoderMethod · 0.65
getIpMethod · 0.45
getServerMethod · 0.45
getPortMethod · 0.45

Tested by

no test coverage detected