public class I2PTunnelUDPServerBase extends I2PTunnelTask implements Source, Sink
| Modifier and Type | Field and Description |
|---|---|
protected Logging | l |
protected long | readTimeoutdefault 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()Gets the read idle timeout for newly-created connections (in
milliseconds). |
void | send(Destination to,
int fromPort,
int toPort,
byte[] data)Sends data through the I2P sink. |
void | setReadTimeout(long ms)Sets 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, getSocketManager, 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 - the destination to send tofromPort - I2CP source port, 0-65535toPort - I2CP destination port, 0-65535data - the data to sendRuntimeException - if the session is closedpublic void setReadTimeout(long ms)
ms - the timeout in milliseconds, or -1 for no timeoutpublic void setSink(Sink s)
public void start()
public void startRunning()