net.i2p.i2ptunnel.udp
Class UDPSource

java.lang.Object
  extended by net.i2p.i2ptunnel.udp.UDPSource
All Implemented Interfaces:
java.lang.Runnable, Source

public class UDPSource
extends java.lang.Object
implements Source, java.lang.Runnable

Author:
welterde

Field Summary
static int MAX_SIZE
           
protected  Sink sink
           
protected  java.net.DatagramSocket sock
           
protected  java.lang.Thread thread
           
 
Constructor Summary
UDPSource(java.net.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 java.net.DatagramSocket sock

sink

protected Sink sink

thread

protected java.lang.Thread thread
Constructor Detail

UDPSource

public UDPSource(int port)

UDPSource

public UDPSource(java.net.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 java.lang.Runnable

stop

public void stop()