Search in sources :

Example 1 with InternalServerSocket

use of net.i2p.util.InternalServerSocket in project i2p.i2p by i2p.

the class InternalSocketRunner method run.

@Override
public final void run() {
    try {
        this.ss = new InternalServerSocket(this.port);
        this.open = true;
        while (this.open) {
            Socket s = this.ss.accept();
            this.client.manageConnection(s);
        }
    } catch (IOException ex) {
        if (this.open) {
            Log log = new Log(InternalSocketRunner.class);
            log.error("Error listening for internal connections on port " + this.port, ex);
            stopRunning();
        }
    }
}
Also used : Log(net.i2p.util.Log) InternalServerSocket(net.i2p.util.InternalServerSocket) IOException(java.io.IOException) ServerSocket(java.net.ServerSocket) Socket(java.net.Socket) InternalServerSocket(net.i2p.util.InternalServerSocket)

Aggregations

IOException (java.io.IOException)1 ServerSocket (java.net.ServerSocket)1 Socket (java.net.Socket)1 InternalServerSocket (net.i2p.util.InternalServerSocket)1 Log (net.i2p.util.Log)1