public class UdpLink extends java.lang.Object implements NetworkLink
Constructor and Description |
---|
UdpLink(SctpSocket sctpSocket,
java.lang.String localIp,
int localPort,
java.lang.String remoteIp,
int remotePort)
Creates new instance of UdpConnection.
|
Modifier and Type | Method and Description |
---|---|
void |
onConnOut(SctpSocket s,
byte[] packetData)
Callback triggered by SctpSocket whenever it wants to send some
network packet.
|
public UdpLink(SctpSocket sctpSocket, java.lang.String localIp, int localPort, java.lang.String remoteIp, int remotePort) throws java.io.IOException
sctpSocket
- SCTP socket instance used by this connection.localIp
- local IP address.localPort
- local UDP port.remoteIp
- remote address.remotePort
- destination UDP port.java.io.IOException
- when we fail to resolve any of addresses
or when opening UDP socket.public void onConnOut(SctpSocket s, byte[] packetData) throws java.io.IOException
onConnOut
in interface NetworkLink
s
- source SctpSocket instance.packetData
- network packet buffer.java.io.IOException
- in case of transport error.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.