Class SOCKSUDPPort

java.lang.Object
net.i2p.i2ptunnel.socks.SOCKSUDPPort
All Implemented Interfaces:
Sink, Source

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 -> (I2PSink in SOCKSUDPTunnel) RX: UDPSink <- SOCKSUDPWrapper ( <- MultiSink <- I2PSource in SOCKSUDPTunnel) The Unwrapper passes headers to the Wrapper through a cache. MultiSink routes packets based on toPort.
Author:
zzz
  • Constructor Details

  • Method Details

    • getPort

      public int getPort()
      Socks passes this back to the client on the TCP connection
    • setSink

      public void setSink(Sink sink)
      Specified by:
      setSink in interface Source
    • start

      public void start()
      Specified by:
      start in interface Source
    • stop

      public void stop()
    • send

      public void send(Destination from, int fromPort, int toPort, byte[] data)
      May throw RuntimeException from underlying sink
      Specified by:
      send in interface Sink
      Parameters:
      from - will be passed along
      fromPort - will be passed along
      toPort - will be passed along
      Throws:
      RuntimeException
      Since:
      0.9.53 added fromPort and toPort parameters