Class SOCKSUDPWrapper

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

public class SOCKSUDPWrapper extends Object implements Source, Sink
Put a SOCKS header on a datagram Ref: RFC 1928
Author:
zzz
  • Constructor Details

  • 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 from, int fromPort, int toPort, byte[] data)
      Use the cached header, which should have the host string and port May throw RuntimeException from underlying sink
      Specified by:
      send in interface Sink
      Parameters:
      from - some implementations may ignore, may be null in some implementations
      fromPort - I2CP source port, 0-65535
      toPort - I2CP destination port, 0-65535
      Throws:
      RuntimeException
      Since:
      0.9.53 added fromPort and toPort parameters