Bouncy Castle Cryptography Library 1.64

org.bouncycastle.crypto.tls
Class UDPTransport

java.lang.Object
  |
  +--org.bouncycastle.crypto.tls.UDPTransport
All Implemented Interfaces:
DatagramTransport, TlsCloseable

public class UDPTransport
extends java.lang.Object
implements DatagramTransport


Field Summary
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
UDPTransport(java.net.DatagramSocket socket, int mtu)
           
 
Method Summary
 void close()
           
 int getReceiveLimit()
           
 int getSendLimit()
           
 int receive(byte[] buf, int off, int len, int waitMillis)
           
 void send(byte[] buf, int off, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_IP_OVERHEAD

protected static final int MIN_IP_OVERHEAD

MAX_IP_OVERHEAD

protected static final int MAX_IP_OVERHEAD

UDP_OVERHEAD

protected static final int UDP_OVERHEAD

socket

protected final java.net.DatagramSocket socket

receiveLimit

protected final int receiveLimit

sendLimit

protected final int sendLimit
Constructor Detail

UDPTransport

public UDPTransport(java.net.DatagramSocket socket,
                    int mtu)
             throws java.io.IOException
Method Detail

getReceiveLimit

public int getReceiveLimit()
Specified by:
getReceiveLimit in interface DatagramTransport

getSendLimit

public int getSendLimit()
Specified by:
getSendLimit in interface DatagramTransport

receive

public int receive(byte[] buf,
                   int off,
                   int len,
                   int waitMillis)
            throws java.io.IOException
Specified by:
receive in interface DatagramTransport

send

public void send(byte[] buf,
                 int off,
                 int len)
          throws java.io.IOException
Specified by:
send in interface DatagramTransport

close

public void close()
           throws java.io.IOException
Specified by:
close in interface TlsCloseable

Bouncy Castle Cryptography Library 1.64