Class 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 Ref: RFC 1928
    Author:
    zzz
    • Constructor Detail

      • SOCKSUDPUnwrapper

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

      • 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,
                         byte[] data)
        May throw RuntimeException from underlying sink
        Specified by:
        send in interface Sink
        Parameters:
        ignored_from - some implementations may ignore
        Throws:
        RuntimeException