public class RtcpSocket
extends java.lang.Object
RtcpSocket is associated to a UdpSocket used to send and/or receive RtcpPackets.
Constructor and Description |
---|
RtcpSocket(UdpSocket udp_socket)
Creates a new RTCP socket (only receiver).
|
RtcpSocket(UdpSocket udp_socket,
SocketAddress remote_dest_soaddr)
Creates a new RTCP socket (sender and receiver).
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this socket.
|
SocketAddress |
getRemoteSourceSoAddress()
Gets the remote source socket address.
|
UdpSocket |
getUdpSocket()
Gets the UDP socket.
|
void |
receive(RtcpCompoundPacket rcomp_packet)
Receives a RTCP compound packet from this socket.
|
void |
send(RtcpCompoundPacket rcomp_packet)
Sends a RTCP compound packet from this socket.
|
void |
send(RtcpPacket rtcp_packet)
Sends a RTCP packet from this socket.
|
void |
setRemoteDestSoAddress(SocketAddress remote_dest_soaddr)
Changes the remote destination socket address.
|
void |
setSymmetricRtpMode(boolean symmetric_rtcp)
Sets symmetric RTCP mode.
|
public RtcpSocket(UdpSocket udp_socket)
udp_socket
- the local UDP socket used for receiving RTCP packetspublic RtcpSocket(UdpSocket udp_socket, SocketAddress remote_dest_soaddr)
udp_socket
- the local UDP socket used for sending and receiving RTCP packetsremote_dest_soaddr
- the remote destination UDP socket address where RTCP packet are sent topublic void setSymmetricRtpMode(boolean symmetric_rtcp)
symmetric_rtcp
- whether working in symmetric RTCP modepublic void setRemoteDestSoAddress(SocketAddress remote_dest_soaddr)
remote_dest_soaddr
- the remote UDP socket address where RTCP packet are sent topublic UdpSocket getUdpSocket()
public SocketAddress getRemoteSourceSoAddress()
public void receive(RtcpCompoundPacket rcomp_packet) throws java.io.IOException
rcomp_packet
- RTCP compound packet that will containing the received packetjava.io.IOException
public void send(RtcpCompoundPacket rcomp_packet) throws java.io.IOException
rcomp_packet
- RTCP compound packet to be sentjava.io.IOException
public void send(RtcpPacket rtcp_packet) throws java.io.IOException
rtcp_packet
- RTCP packet to be sentjava.io.IOException
public void close()