Class SOCKSUDPTunnel

  extended by net.i2p.i2ptunnel.I2PTunnelTask
      extended by net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
          extended by net.i2p.i2ptunnel.socks.SOCKSUDPTunnel
All Implemented Interfaces:
Sink, Source, EventDispatcher

public class SOCKSUDPTunnel
extends I2PTunnelUDPClientBase

A Datagram Tunnel that can have multiple bidirectional ports on the UDP side. TX: (ReplyTracker in multiple SOCKSUDPPorts -> ) I2PSink RX: (SOCKSUDPWrapper in multiple SOCKSUDPPorts <- ) MultiSink <- I2PSource The reply from a dest goes to the last SOCKSUDPPort that sent to that dest. If multiple ports are talking to a dest at the same time, this isn't going to work very well.

zzz modded from streamr/StreamrConsumer

Field Summary
Fields inherited from class net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
_clientId, _context, dest, l
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask
Constructor Summary
SOCKSUDPTunnel(I2PTunnel tunnel)
          Set up a tunnel with no UDP side yet.
Method Summary
 int add( host, int port)
 boolean close(boolean forced)
          I2PTunnelTask Methods Classes should override to close UDP side as well
 void remove(java.lang.Integer port)
 void startRunning()
          Actually start working on outgoing connections.
Methods inherited from class net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
send, setSink, start
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

Constructor Detail


public SOCKSUDPTunnel(I2PTunnel tunnel)
Set up a tunnel with no UDP side yet. Use add() for each port.

Method Detail


public int add( host,
               int port)
the UDP port number


public void remove(java.lang.Integer port)


public final void startRunning()
Description copied from class: I2PTunnelUDPClientBase
Actually start working on outgoing connections. Classes should override to start UDP side as well. Not specified in I2PTunnelTask but used in both I2PTunnelClientBase and I2PTunnelServer so let's implement it here too.

startRunning in class I2PTunnelUDPClientBase


public boolean close(boolean forced)
Description copied from class: I2PTunnelUDPClientBase
I2PTunnelTask Methods Classes should override to close UDP side as well

close in class I2PTunnelUDPClientBase