public class DCCClientManager extends EventReceiver
direct conn
<---> I2PTunnelDCCServer <--------------->I2PTunnelDCCClient <---->
originating responding
chat client chat client
CHAT ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
SEND ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
RESUME <--- I2PTunnelIRCClient <-- IRC server <-- I2TunnelIRCClient <-----
ACCEPT ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
| Constructor and Description |
|---|
DCCClientManager(I2PSocketManager sktMgr,
Logging logging,
EventDispatcher dispatch,
I2PTunnel tunnel)Create a new manager for DCC client tunnels. |
| Modifier and Type | Method and Description |
|---|---|
int | acceptIncoming(int port)Handle an incoming DCC ACCEPT response from the remote peer. |
boolean | close(boolean forced)Close all DCC client tunnels managed by this manager. |
int | newIncoming(String b32,
int port,
String type)Handle an incoming DCC request from a remote peer. |
void | notifyEvent(String eventName,
Object args)EventReceiver callback for DCC client connection events. |
int | resumeOutgoing(int port)Handle an outgoing DCC RESUME request. |
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, unIgnoreEvents, waitEventValuepublic DCCClientManager(I2PSocketManager sktMgr, Logging logging, EventDispatcher dispatch, I2PTunnel tunnel)
sktMgr - the socket manager for creating connectionslogging - the logging facilitydispatch - the event dispatcher for tunnel eventstunnel - the parent I2PTunnel instancepublic int acceptIncoming(int port)
port - the remote DCC server's I2P port from the ACCEPT messagepublic boolean close(boolean forced)
forced - unused parameter, retained for compatibilitypublic int newIncoming(String b32, int port, String type)
b32 - the remote DCC server's base32 destination (60 chars, ending in .b32.i2p)port - the remote DCC server's I2P porttype - the DCC type (currently ignored)public void notifyEvent(String eventName, Object args)
notifyEvent in interface EventDispatchernotifyEvent in class EventReceivereventName - the event name (CONNECT_START_EVENT or CONNECT_STOP_EVENT)args - the event arguments (I2PTunnelDCCClient for start, Integer port for stop)public int resumeOutgoing(int port)
port - the local DCC client tunnel port to resume