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
Constructor and Description |
---|
I2PTunnelUDPClientBase(String destination,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
Modifier and Type | Method and Description |
---|---|
boolean |
close(boolean forced)
I2PTunnelTask Methods
Classes should override to close UDP side as well
|
void |
send(Destination to,
byte[] data)
Sink Methods
|
void |
setSink(Sink s)
Source Methods
Sets the receiver of the UDP datagrams from I2P
Subclass must call this after constructor
and before start()
|
void |
start()
start the source
|
void |
startRunning()
Actually start working on outgoing connections.
|
connected, destroy, disconnected, errorOccurred, getId, getTunnel, isOpen, optionsUpdated, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
protected I2PAppContext _context
protected Logging l
static final long DEFAULT_CONNECT_TIMEOUT
protected long _clientId
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 void startRunning()
public boolean close(boolean forced)
close
in class I2PTunnelTask
public void setSink(Sink s)
public void send(Destination to, byte[] data)
send
in interface Sink
to
- - ignored if configured for a single destination
(we use the dest specified in the constructor)RuntimeException
- if session is closed