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
public class I2PTunnelDCCClient extends I2PTunnelClientBase
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 Modifier and Type Field Description static String
CONNECT_START_EVENT
static String
CONNECT_STOP_EVENT
-
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
Constructors Constructor Description I2PTunnelDCCClient(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clientConnectionRun(Socket s)
Accept one connection only.String
getDest()
long
getExpires()
int
getRemotePort()
void
stop()
Stop listening for new sockets.-
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 Detail
-
CONNECT_START_EVENT
public static final String CONNECT_START_EVENT
- See Also:
- Constant Field Values
-
CONNECT_STOP_EVENT
public static final String CONNECT_STOP_EVENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
clientConnectionRun
protected void clientConnectionRun(Socket s)
Accept one connection only.- Specified by:
clientConnectionRun
in classI2PTunnelClientBase
-
getExpires
public long getExpires()
-
getDest
public String 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
-
-