public class UDPTransport extends java.lang.Object implements DatagramTransport
Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_IP_OVERHEAD |
protected static int |
MIN_IP_OVERHEAD |
protected int |
receiveLimit |
protected int |
sendLimit |
protected java.net.DatagramSocket |
socket |
protected static int |
UDP_OVERHEAD |
Constructor and Description |
---|
UDPTransport(java.net.DatagramSocket socket,
int mtu) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getReceiveLimit() |
int |
getSendLimit() |
int |
receive(byte[] buf,
int off,
int len,
int waitMillis) |
void |
send(byte[] buf,
int off,
int len) |
protected static final int MIN_IP_OVERHEAD
protected static final int MAX_IP_OVERHEAD
protected static final int UDP_OVERHEAD
protected final java.net.DatagramSocket socket
protected final int receiveLimit
protected final int sendLimit
public UDPTransport(java.net.DatagramSocket socket, int mtu) throws java.io.IOException
java.io.IOException
public int getReceiveLimit()
getReceiveLimit
in interface DatagramTransport
public int getSendLimit()
getSendLimit
in interface DatagramTransport
public int receive(byte[] buf, int off, int len, int waitMillis) throws java.io.IOException
receive
in interface DatagramTransport
java.io.IOException
public void send(byte[] buf, int off, int len) throws java.io.IOException
send
in interface DatagramTransport
java.io.IOException
public void close() throws java.io.IOException
close
in interface DatagramTransport
java.io.IOException