Package net.i2p.i2ptunnel.irc
Class I2PTunnelDCCClient
java.lang.Object
net.i2p.util.EventDispatcherImpl
net.i2p.i2ptunnel.I2PTunnelTask
net.i2p.i2ptunnel.I2PTunnelClientBase
net.i2p.i2ptunnel.irc.I2PTunnelDCCClient
- All Implemented Interfaces:
Runnable
,EventDispatcher
A standard client, using an existing socket manager.
Targets a single destination and port.
Naming resolution is delayed until connect time.
- Since:
- 0.8.9
-
Field Summary
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelClientBase
_clientId, _context, _log, _ownDest, dest, l, listenerReady, mySockets, PROP_USE_SSL, sockLock, sockMgr, ss
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask
open
-
Constructor Summary
ConstructorDescriptionI2PTunnelDCCClient
(String dest, int localPort, int remotePort, Logging l, I2PSocketManager sktMgr, EventDispatcher notifyThis, I2PTunnel tunnel, long clientId) As of 0.9.20 this is fast, and does NOT connect the manager to the router, or open the local socket. -
Method Summary
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelClientBase
addSubsession, buildSocketManager, buildSocketManager, buildSocketManager, buildSocketManager, close, closeSocket, createI2PSocket, createI2PSocket, createI2PSocket, destroy, getDefaultOptions, getDefaultOptions, getListenHost, getLocalPort, getSocketManager, getSocketManager, getSocketManager, killSharedClient, manageConnection, optionsUpdated, run, startRunning, verifySocketManager
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask
connected, disconnected, errorOccurred, getId, getTunnel, isOpen, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString
Methods inherited from class net.i2p.util.EventDispatcherImpl
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
-
Field Details
-
CONNECT_START_EVENT
- See Also:
-
CONNECT_STOP_EVENT
- See Also:
-
-
Constructor Details
-
I2PTunnelDCCClient
public I2PTunnelDCCClient(String dest, int localPort, int remotePort, Logging l, I2PSocketManager sktMgr, EventDispatcher notifyThis, I2PTunnel tunnel, long clientId) throws IllegalArgumentException As of 0.9.20 this is fast, and does NOT connect the manager to the router, or open the local socket. You MUST call startRunning() for that.- Parameters:
dest
- the target, presumably b32localPort
- if 0, use any port, get actual port selected with getLocalPort()- Throws:
IllegalArgumentException
- if the I2PTunnel does not contain valid config to contact the router
-
-
Method Details
-
clientConnectionRun
Accept one connection only.- Specified by:
clientConnectionRun
in classI2PTunnelClientBase
-
getExpires
public long getExpires() -
getDest
-
getRemotePort
public int getRemotePort() -
stop
public void stop()Stop listening for new sockets. We can't call super.close() as it kills all sockets in the sockMgr
-