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, tunnel| Constructor and Description |
|---|
I2PTunnelUDPServerBase(File privkey,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close(boolean forced)
Closes the tunnel and destroys the session.
|
long |
getReadTimeout()
Get the read idle timeout for newly-created connections (in
milliseconds).
|
void |
send(Destination to,
int fromPort,
int toPort,
byte[] data)
Sink Methods
|
void |
setReadTimeout(long ms)
Set the read idle timeout for newly-created connections (in
milliseconds).
|
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 Logging l
protected long readTimeout
protected Object slock
public I2PTunnelUDPServerBase(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 boolean close(boolean forced)
close in class I2PTunnelTaskforced - if true, force immediate close without graceful shutdownpublic long getReadTimeout()
public void send(Destination to, int fromPort, int toPort, byte[] data)
send in interface Sinkto - fromPort - I2CP source port, 0-65535toPort - I2CP destination port, 0-65535RuntimeException - if session is closedpublic void setReadTimeout(long ms)
public void setSink(Sink s)
public void start()
public void startRunning()