public abstract class I2PTunnelUDPClientBase extends I2PTunnelTask implements Source, Sink
| Modifier and Type | Field and Description |
|---|---|
protected long |
_clientId |
protected I2PAppContext |
_context |
(package private) static long |
DEFAULT_CONNECT_TIMEOUT |
protected Logging |
l |
open, tunnel| Constructor and Description |
|---|
I2PTunnelUDPClientBase(String destination,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close(boolean forced)
Closes the tunnel and destroys the session.
|
void |
send(Destination to,
int fromPort,
int toPort,
byte[] data)
Sink Methods
|
void |
setSink(Sink s)
Sets the receiver of the UDP datagrams from I2P.
|
void |
start()
Starts the I2P source to begin receiving datagrams.
|
void |
startRunning()
Starts the tunnel and begins processing datagrams.
|
connected, destroy, disconnected, errorOccurred, getBooleanOption, getId, getTunnel, isOpen, optionsUpdated, reportAbuse, routerDisconnected, setId, setName, setTunnel, toStringattachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValueprotected long _clientId
protected I2PAppContext _context
static final long DEFAULT_CONNECT_TIMEOUT
protected Logging l
public I2PTunnelUDPClientBase(String destination, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel) throws IllegalArgumentException
IllegalArgumentException - if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic boolean close(boolean forced)
close in class I2PTunnelTaskforced - if true, force immediate close without graceful shutdownpublic void send(Destination to, int fromPort, int toPort, byte[] data)
send in interface Sinkto - - ignored if configured for a single destination
(we use the dest specified in the constructor)fromPort - I2CP source port, 0-65535toPort - I2CP destination port, 0-65535RuntimeException - if session is closedpublic void setSink(Sink s)
public void start()
public void startRunning()