## net.i2p.i2ptunnel.udp
Class UDPSource

    java.lang.Object
      net.i2p.i2ptunnel.udp.UDPSource

All Implemented Interfaces:
  Runnable, Source

    public class UDPSource

extends Object
implements Source, Runnable

Author:
  welterde

Field Summary
`static int` `MAX_SIZE`
`protected Sink` `sink`
`protected DatagramSocket` `sock`
`protected Thread` `thread`

Constructor Summary
`UDPSource(DatagramSocket sock)` use socket from UDPSink
`UDPSource(int port)`

Method Summary
`void` `run()`
`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`

Field Detail

### MAX_SIZE

    public static final int MAX_SIZE

See Also:
  Constant Field Values

### sock

    protected DatagramSocket sock

### sink

    protected Sink sink

### thread

    protected Thread thread

Constructor Detail

### UDPSource

    public UDPSource(int port)

### UDPSource

    public UDPSource(DatagramSocket sock)

  use socket from UDPSink

Method Detail

### setSink

    public void setSink(Sink sink)

  Specified by:
    `setSink` in interface `Source`

### start

    public void start()

  Specified by:
    `start` in interface `Source`

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`

### stop

    public void stop()