de.unkrig.commons.net
Interface TcpServer.ConnectionHandler

Enclosing class:
TcpServer

public static interface TcpServer.ConnectionHandler

Represents a TCP connection to a remote peer (e.g. a server or a client).

See Also:
handleConnection(InputStream, OutputStream, InetSocketAddress, InetSocketAddress, Stoppable)

Method Summary
 void handleConnection(java.io.InputStream in, java.io.OutputStream out, java.net.InetSocketAddress localSocketAddress, java.net.InetSocketAddress remoteSocketAddress, Stoppable stoppable)
          The input stream is readable; consume and process one request from it.
 

Method Detail

handleConnection

void handleConnection(java.io.InputStream in,
                      java.io.OutputStream out,
                      java.net.InetSocketAddress localSocketAddress,
                      java.net.InetSocketAddress remoteSocketAddress,
                      Stoppable stoppable)
                      throws java.lang.Exception
The input stream is readable; consume and process one request from it.

Parameters:
stoppable - Stopping this will break the connection
Throws:
java.lang.Exception