Package org.bouncycastle.crypto.tls
Class UDPTransport
- java.lang.Object
-
- org.bouncycastle.crypto.tls.UDPTransport
-
- All Implemented Interfaces:
DatagramTransport
public class UDPTransport extends java.lang.Object implements DatagramTransport
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description UDPTransport(java.net.DatagramSocket socket, int mtu)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
MIN_IP_OVERHEAD
protected static final int MIN_IP_OVERHEAD
- See Also:
- Constant Field Values
-
MAX_IP_OVERHEAD
protected static final int MAX_IP_OVERHEAD
- See Also:
- Constant Field Values
-
UDP_OVERHEAD
protected static final int UDP_OVERHEAD
- See Also:
- Constant Field Values
-
socket
protected final java.net.DatagramSocket socket
-
receiveLimit
protected final int receiveLimit
-
sendLimit
protected final int sendLimit
-
-
Method Detail
-
getReceiveLimit
public int getReceiveLimit()
- Specified by:
getReceiveLimit
in interfaceDatagramTransport
-
getSendLimit
public int getSendLimit()
- Specified by:
getSendLimit
in interfaceDatagramTransport
-
receive
public int receive(byte[] buf, int off, int len, int waitMillis) throws java.io.IOException
- Specified by:
receive
in interfaceDatagramTransport
- Throws:
java.io.IOException
-
send
public void send(byte[] buf, int off, int len) throws java.io.IOException
- Specified by:
send
in interfaceDatagramTransport
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfaceDatagramTransport
- Throws:
java.io.IOException
-
-