net.i2p.i2ptunnel.udp
Class UDPSource
java.lang.Object
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
Constructor Summary |
UDPSource(java.net.DatagramSocket sock)
use socket from UDPSink |
UDPSource(int port)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
UDPSource
public UDPSource(int port)
UDPSource
public UDPSource(java.net.DatagramSocket sock)
- use socket from UDPSink
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()