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

Method run

src/main/java/core/packetproxy/ProxyUDPForward.java:36–57  ·  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 Endpoint client_endpoint = listen_socket.accept();
43 log("accept");
44
45 InetSocketAddress serverAddr = listen_info.getServer().getAddress();
46 UDPSocketEndpoint server_endpoint = new UDPSocketEndpoint(serverAddr);
47
48 DuplexAsync duplex = DuplexFactory.createDuplexAsync(client_endpoint, server_endpoint,
49 listen_info.getServer().getEncoder());
50 duplex.start();
51 DuplexManager.getInstance().registerDuplex(duplex);
52 }
53 } catch (Exception e) {
54
55 errWithStackTrace(e);
56 }
57 }
58
59 public void close() throws Exception {
60 listen_socket.close();

Callers

nothing calls this directly

Calls 10

createDuplexAsyncMethod · 0.95
startMethod · 0.95
getInstanceMethod · 0.95
registerDuplexMethod · 0.80
errWithStackTraceMethod · 0.80
acceptMethod · 0.65
logMethod · 0.65
getAddressMethod · 0.65
getEncoderMethod · 0.65
getServerMethod · 0.45

Tested by

no test coverage detected