()
| 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(); |
nothing calls this directly
no test coverage detected