## net.i2p.i2ptunnel.socks
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 -> 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
`SOCKSUDPPort(InetAddress host, int port, Map replyMap)`

Method Summary
`int` `getPort()` Socks passes this back to the client on the TCP connection
`void` `send(Destination from, byte[] data)`
`void` `setSink(Sink sink)`
`void` `start()`
`void` `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SOCKSUDPPort

    public SOCKSUDPPort(InetAddress host,
                        int port,
                        Map replyMap)

Method Detail

### 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,
                     byte[] data)

  Specified by:
    `send` in interface `Sink`