Package net.i2p.i2ptunnel.socks
Class SOCKSUDPPort
java.lang.Object
net.i2p.i2ptunnel.socks.SOCKSUDPPort
public class SOCKSUDPPort extends Object implements Source, Sink
Implements a UDP port and Socks encapsulation / decapsulation.
This is for a single port. If there is demuxing for multiple
ports, it happens outside of here.
TX:
UDPSource -> SOCKSUDPUnwrapper -> ReplyTracker ( -> I2PSink in SOCKSUDPTunnel)
RX:
UDPSink <- SOCKSUDPWrapper ( <- MultiSink <- I2PSource in SOCKSUDPTunnel)
The Unwrapper passes headers to the Wrapper through a cache.
The ReplyTracker passes sinks to MultiSink through a cache.
- Author:
- zzz
-
Constructor Summary
Constructors Constructor Description SOCKSUDPPort(InetAddress host, int port, Map<Destination,SOCKSUDPPort> replyMap)
-
Method Summary
-
Constructor Details
-
Method Details
-
getPort
public int getPort()Socks passes this back to the client on the TCP connection -
setSink
-
start
public void start() -
stop
public void stop() -
send
May throw RuntimeException from underlying sink- Specified by:
send
in interfaceSink
- Parameters:
from
- some implementations may ignore- Throws:
RuntimeException
-