Package org.bouncycastle.tls
Class UDPTransport
- java.lang.Object
-
- org.bouncycastle.tls.UDPTransport
-
- All Implemented Interfaces:
DatagramReceiver,DatagramSender,DatagramTransport,TlsCloseable
public class UDPTransport extends java.lang.Object implements DatagramTransport
-
-
Field Summary
Fields Modifier and Type Field Description protected static intMAX_IP_OVERHEADprotected static intMIN_IP_OVERHEADprotected intreceiveLimitprotected intsendLimitprotected java.net.DatagramSocketsocketprotected static intUDP_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 voidclose()intgetReceiveLimit()intgetSendLimit()intreceive(byte[] buf, int off, int len, int waitMillis)voidsend(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:
getReceiveLimitin interfaceDatagramReceiver
-
getSendLimit
public int getSendLimit()
- Specified by:
getSendLimitin interfaceDatagramSender
-
receive
public int receive(byte[] buf, int off, int len, int waitMillis) throws java.io.IOException- Specified by:
receivein interfaceDatagramReceiver- Throws:
java.io.IOException
-
send
public void send(byte[] buf, int off, int len) throws java.io.IOException- Specified by:
sendin interfaceDatagramSender- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfaceTlsCloseable- Throws:
java.io.IOException
-
-