public class I2PTunnelUDPServerBase extends I2PTunnelTask implements Source, Sink
Modifier and Type | Field and Description |
---|---|
protected Logging |
l |
protected long |
readTimeout
default timeout to 3 minutes - override if desired
|
protected Object |
slock |
open
Constructor and Description |
---|
I2PTunnelUDPServerBase(boolean verify,
File privkey,
String privkeyname,
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
|
long |
getReadTimeout()
Get the read idle timeout for newly-created connections (in
milliseconds).
|
void |
send(Destination to,
byte[] data)
Sink Methods
|
void |
setReadTimeout(long ms)
Set the read idle timeout for newly-created connections (in
milliseconds).
|
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()
Classes should override to start UDP side as well.
|
connected, destroy, disconnected, errorOccurred, getId, getTunnel, isOpen, optionsUpdated, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
protected Object slock
protected Logging l
protected long readTimeout
public I2PTunnelUDPServerBase(boolean verify, File privkey, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic void startRunning()
public void setReadTimeout(long ms)
public long getReadTimeout()
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
- RuntimeException
- if session is closed