Modifier and Type | Field and Description |
---|---|
static int |
MAX_SIZE |
protected Sink |
sink |
protected DatagramSocket |
sock |
protected Thread |
thread |
Constructor and Description |
---|
UDPSource(DatagramSocket sock)
use socket from UDPSink
|
UDPSource(int port) |
Modifier and Type | Method and Description |
---|---|
int |
getPort() |
void |
run() |
void |
setSink(Sink sink) |
void |
start() |
void |
stop() |
protected final DatagramSocket sock
protected Sink sink
protected final Thread thread
public static final int MAX_SIZE
public UDPSource(int port)
RuntimeException
- on DatagramSocket IOExceptionpublic UDPSource(DatagramSocket sock)