question: private void accept ( Socket socket ) { log . info ( "Client connected from {}" , socket . getInetAddress ( ) ) ; try { InetAddress serverAddress = dns . getAddress ( "gamea.clashofclans.com" ) ; try ( Connection clientConnection = new Connection ( socket ) ; Connection serverConnection = new Connection ( new Socket ( serverAddress , CLASH_PORT ) ) ) { ProxySession session = ProxySession . newSession ( services . getMessageFactory ( ) , clientConnection , serverConnection , filterChain ) ; log . info ( "Client {} disconnected" , socket ) ; VillageAnalyzer . logSession ( session ) ; } } catch ( IOException e ) { log . info ( "Could not proxy connection from {}: {}" , socket . getInetAddress ( ) , e . toString ( ) ) ; } finally { try { socket . close ( ) ; } catch ( IOException e ) { } } }
target:  Accept a connection from a client and proxy it to the server. Will block until processing completes (typically because the client closes its connection to us). <p> The socket and any associated streams will be closed before this call completes.