|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.i2ptunnel.I2PTunnelTask
net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPServerBase
public class I2PTunnelUDPServerBase
Base client class that sets up an I2P Datagram server destination. The UDP side is not implemented here, as there are at least two possibilities: 1) UDP side is a "client" Example: Streamr Producer - configure an inbound port - External application receives no data - Extending class must have a constructor with a port argument 2) UDP side is a client/server Example: DNS - configure an inbound port and a destination host and port - External application sends and receives data - Extending class must have a constructor with host and 2 port arguments So the implementing class must create a UDPSource and/or UDPSink, and must call setSink().
Field Summary | |
---|---|
protected Logging |
l
|
protected long |
readTimeout
default timeout to 3 minutes - override if desired |
protected Object |
slock
|
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask |
---|
open |
Constructor Summary | |
---|---|
I2PTunnelUDPServerBase(boolean verify,
File privkey,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
Method Summary | |
---|---|
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. |
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask |
---|
attachEventDispatcher, detachEventDispatcher, disconnected, errorOccurred, getEventDispatcher, getEvents, getEventValue, getId, getTunnel, ignoreEvents, isOpen, notifyEvent, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString, unIgnoreEvents, waitEventValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Object slock
protected Logging l
protected long readTimeout
Constructor Detail |
---|
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 socketManagerMethod Detail |
---|
public void startRunning()
public void setReadTimeout(long ms)
public long getReadTimeout()
public boolean close(boolean forced)
close
in class I2PTunnelTask
public void setSink(Sink s)
setSink
in interface Source
public void start()
start
in interface Source
public void send(Destination to, byte[] data)
send
in interface Sink
to
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |