public class DatagramTransportImpl
extends java.lang.Object
implements org.bouncycastle.crypto.tls.DatagramTransport
DatagramTransport
in order to integrate the Bouncy Castle
Crypto APIs in libjitsi for the purposes of implementing DTLS-SRTP.Constructor and Description |
---|
DatagramTransportImpl(int componentID)
Initializes a new DatagramTransportImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getReceiveLimit() |
int |
getSendLimit() |
(package private) void |
queueReceive(byte[] buf,
int off,
int len)
Queues a packet received from the network to be received by the
application through this DatagramTransport.
|
int |
receive(byte[] buf,
int off,
int len,
int waitMillis) |
void |
send(byte[] buf,
int off,
int len) |
(package private) void |
setConnector(AbstractRTPConnector connector)
Sets the RTPConnector which represents and implements the actual
DatagramSocket to be adapted by this instance.
|
public DatagramTransportImpl(int componentID)
componentID
- Component.RTP
if the new instance is to work
on data/RTP packets or Component.RTCP
if the new instance is to
work on control/RTCP packetspublic void close() throws java.io.IOException
close
in interface org.bouncycastle.crypto.tls.DatagramTransport
java.io.IOException
public int getReceiveLimit() throws java.io.IOException
getReceiveLimit
in interface org.bouncycastle.crypto.tls.DatagramTransport
java.io.IOException
public int getSendLimit() throws java.io.IOException
getSendLimit
in interface org.bouncycastle.crypto.tls.DatagramTransport
java.io.IOException
void queueReceive(byte[] buf, int off, int len)
buf
- the array of bytes which contains the packet to be
queuedoff
- the offset within buf at which the packet to be
queued startslen
- the length within buf starting at off of the
packet to be queuedpublic int receive(byte[] buf, int off, int len, int waitMillis) throws java.io.IOException
receive
in interface org.bouncycastle.crypto.tls.DatagramTransport
java.io.IOException
public void send(byte[] buf, int off, int len) throws java.io.IOException
send
in interface org.bouncycastle.crypto.tls.DatagramTransport
java.io.IOException
void setConnector(AbstractRTPConnector connector)
connector
- the RTPConnector which represents and
implements the actual DatagramSocket to be adapted by this
instance
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.