Class SOCKSUDPUnwrapper

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

public class SOCKSUDPUnwrapper extends Object implements Source, Sink
Strip a SOCKS header off a datagram, convert it to a Destination and port Ref: RFC 1928
Author:
zzz
  • Constructor Details

    • SOCKSUDPUnwrapper

      public SOCKSUDPUnwrapper(Map<I2PSocketAddress,SOCKSHeader> cache)
      Parameters:
      cache - put headers here to pass to SOCKSUDPWrapper
  • Method Details

    • setSink

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

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

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