net.i2p.client.streaming
Class ConnectionHandler

java.lang.Object
  extended by net.i2p.client.streaming.ConnectionHandler

 class ConnectionHandler
extends java.lang.Object

Receive new connection attempts


Constructor Summary
ConnectionHandler(I2PAppContext context, ConnectionManager mgr)
          Creates a new instance of ConnectionHandler
 
Method Summary
 Connection accept(long timeoutMs)
          Receive an incoming connection (built from a received SYN)
 boolean getActive()
           
 void receiveNewSyn(Packet packet)
           
 void setActive(boolean active)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHandler

public ConnectionHandler(I2PAppContext context,
                         ConnectionManager mgr)
Creates a new instance of ConnectionHandler

Method Detail

setActive

public void setActive(boolean active)

getActive

public boolean getActive()

receiveNewSyn

public void receiveNewSyn(Packet packet)

accept

public Connection accept(long timeoutMs)
Receive an incoming connection (built from a received SYN)

Parameters:
timeoutMs - max amount of time to wait for a connection (if less than 1ms, wait indefinitely)
Returns:
connection received, or null if there was a timeout or the handler was shut down