A peer associated RTP socket pair for physically connected peer hosts.
More...
#include <cc++/rtp.h>
Inheritance diagram for RTPDuplex:
Collaboration diagram for RTPDuplex:
Public Types
Public Member Functions
Specify the kind of service the application expects to use.
More...
Enable packet queue processing in the stack.
More...
Disable packet queue processing in the stack.
More...
Get active connection state flag.
More...
Get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time.
More...
Specify the bandwidth of the current session.
More...
Set the packet timeclock for synchronizing timestamps.
More...
Get the packet timeclock for synchronizing timestamps.
More...
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer.
More...
Determine if packets are waiting in the reception queue.
More...
Get timestamp of first packet waiting in the queue.
More...
When receiving packets from a new source, it may be convenient to reject a first few packets before we are really sure the source is valid.
More...
Get the minimun number of consecutive packets that must be received from a source before accepting its data packets.
More...
It also prevents packets sent after a restart of the source being immediately accepted.
More...
Set the payload format in use, for timing and payload type identification purposes.
More...
Get the clock rate in RTP clock units (for instance, 8000 units per second for PCMU, or 90000 units per second for MP2T).
More...
Add csrc as the CSRC identifier of a new contributor.
More...
Remove CSRC from the list of contributors.
More...
Determine if outgoing packets are waiting to send.
More...
void
putData (uint32 stamp, const unsigned char *data=NULL, size_t len=0)
This is used to create a data packet in the send queue.
More...
void
sendImmediate (uint32 stamp, const unsigned char *data=NULL, size_t len=0)
This is used to create a data packet and send it immediately.
More...
Set marker bit for the packet in which the next data provided will be send.
More...
Get wheter the mark bit will be set in the next packet.
More...
size_t
setPartial (uint32 timestamp, unsigned char *data, size_t offset, size_t max)
Set partial data for an already queued packet.
More...
Set the default scheduling timeout to use when no data packets are waiting to be sent.
More...
Set the "expired" timer for expiring packets pending in the send queue which have gone unsent and are already "too late" to be sent now.
More...
Get the total number of packets sent so far.
More...
Get the total number of octets (payload only) sent so far.
More...
Get the sequence number of the next outgoing packet.
More...
Set maximum payload segment size before fragmenting sends.
More...
ssize_t
transmit (const char *buffer, size_t len)
Transmit "send" to use "connected" send rather than sendto.
More...
See if output queue is empty for sending more packets.
More...
set the peer address to send message packets to.
More...
Associate socket with a named connection.
More...
get the interface index for a named network device
More...
join a multicast group on a particular interface
More...
ssize_t
receive (void *buf, size_t len, bool reply=false)
Receive a message from any host.
More...
Examine address of sender of next waiting packet.
More...
ssize_t
peek (void *buf, size_t len)
Examine contents of next waiting packet.
More...
Disassociate this socket from any host connection.
More...
Get the local address and port number this socket is currently bound to.
More...
Perform NAT table lookup for this socket.
More...
Used to specify blocking mode for the socket.
More...
Enable lingering sockets on close.
More...
Can test to see if this socket is "connected", and hence whether a "catch" can safely call
getPeer().
More...
Test to see if the socket is at least operating or if it is mearly initialized.
More...
Operator based testing to see if a socket is currently active.
More...
Return if broadcast has been enabled for the specified socket.
More...
Return if socket routing is enabled.
More...
Often used by a "catch" to fetch the last error of a thrown socket.
More...
Often used by a "catch" to fetch the user set error string of a thrown socket, but only if EXTENDED error codes are used.
More...
Static Public Member Functions
See if a specific protocol family is available in the current runtime environment.
More...
Protected Types
enum
Error {
errSuccess = 0,
errCreateFailed,
errCopyFailed,
errInput,
errInputInterrupt,
errResourceFailure,
errOutput,
errOutputInterrupt,
errNotConnected,
errConnectRefused,
errConnectRejected,
errConnectTimeout,
errConnectFailed,
errConnectInvalid,
errConnectBusy,
errConnectNoRoute,
errBindingFailed,
errBroadcastDenied,
errRoutingDenied,
errKeepaliveDenied,
errServiceDenied,
errServiceUnavailable,
errMulticastDisabled,
errTimeout,
errNoDelay,
errExtended,
errLookupFail,
errSearchErr,
errInvalidValue
}
Protected Member Functions
size_t
sendData (const unsigned char *const buffer, size_t len)
A plugin point for timer tick driven events.
More...
This method ends the queue.
More...
Apply collision and loop detection and correction algorithm when receiving RTP data packets.
More...
Set the number of RTCP intervals that the stack will wait to change the state of a source from stateActive to stateInactive, or to delete the source after being in stateInactive.
More...
This function is used by the service thread to process the next incoming packet and place it in the receive list.
More...
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
More...
Log reception of a new RTP packet from this source.
More...
Log extraction of a packet from this source from the scheduled reception queue.
More...
Virtual called when a new synchronization source has joined the session.
More...
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events.
More...
A hook to filter packets in the receive queue that are being expired.
More...
A hook that gets called if the decoding of an incoming SRTP was erroneous.
More...
Insert a just received packet in the queue (both general and source specific queues).
More...
A plugin point for posting of BYE messages.
More...
Get whether a synchronization source is recorded in this membership controller.
More...
Returns whether there is already a synchronizacion source with "ssrc" SSRC identifier.
More...
Get the description of a source by its
ssrc identifier.
More...
Mark the source identified by
ssrc as having sent a BYE packet.
More...
Remove the description of the source identified by
ssrc More...
This is used to write the RTP data packet to one or more destinations.
More...
This computes the timeout period for scheduling transmission of the next packet at the "head" of the send buffer.
More...
This function is used by the service thread to process the next outgoing packet pending in the sending queue.
More...
For thoses cases in which the application requires a method to set the sequence number for the outgoing stream (such as for implementing the RTSP PLAY command).
More...
Get whether there is only a destination in the list.
More...
Locks the object before modifying it.
More...
Locks the object before modifying it.
More...
Associate this socket with a specified peer host.
More...
join a multicast group on a particular interface
More...
ssize_t
receive (void *buf, size_t len)
Receive a data packet from the connected peer host.
More...
ssize_t
receive (void *buf, size_t len, bool reply=false)
Receive a message from any host.
More...
See if input queue has data packets available.
More...
set the peer address to send message packets to.
More...
Associate socket with a named connection.
More...
get the interface index for a named network device
More...
ssize_t
send (const void *buf, size_t len)
Send a message packet to a peer host.
More...
Examine address of sender of next waiting packet.
More...
ssize_t
peek (void *buf, size_t len)
Examine contents of next waiting packet.
More...
Disassociate this socket from any host connection.
More...
This service is used to throw all socket errors which usually occur during the socket constructor.
More...
void
error (const char *err) const
This service is used to throw application defined socket errors where the application specific error code is a string.
More...
This service is used to turn the error handler on or off for "throwing" exceptions by manipulating the thrown flag.
More...
Used as the default destructor for ending a socket.
More...
Used as a common handler for connection failure processing.
More...
Set the send timeout for sending raw network data.
More...
Receive timeout for receiving raw network data.
More...
Set the protocol stack network kernel send buffer size associated with the socket.
More...
Set the protocol stack network kernel receive buffer size associated with the socket.
More...
Set the total protocol stack network kernel buffer size for both send and receive together.
More...
Set the subnet broadcast flag for the socket.
More...
Setting multicast binds the multicast interface used for the socket to the interface the socket itself has been implicitly bound to.
More...
Set the multicast loopback flag for the socket.
More...
Set the multicast time to live for a multicast socket.
More...
Enable/disable delaying packets (Nagle algorithm)
More...
Process a logical input line from a socket descriptor directly.
More...
Read in a block of len bytes with specific separator.
More...
Write a block of len bytes to socket.
More...
May be used to examine the origin of data waiting in the socket receive queue.
More...
Get the local address and port number this socket is currently bound to.
More...
Perform NAT table lookup for this socket.
More...
Used to specify blocking mode for the socket.
More...
Enable lingering sockets on close.
More...
Set packet scheduling on platforms which support ip quality of service conventions.
More...
Can test to see if this socket is "connected", and hence whether a "catch" can safely call
getPeer().
More...
Test to see if the socket is at least operating or if it is mearly initialized.
More...
Operator based testing to see if a socket is currently active.
More...
Return if broadcast has been enabled for the specified socket.
More...
Return if socket routing is enabled.
More...
Often used by a "catch" to fetch the last error of a thrown socket.
More...
Often used by a "catch" to fetch the user set error string of a thrown socket, but only if EXTENDED error codes are used.
More...
Get the status of pending operations.
More...
Associate this socket with a specified peer host.
More...
Associate this socket with a subnet of peer hosts for subnet broadcasting.
More...
Associate this socket with a multicast group.
More...
ssize_t
send (const void *buf, size_t len)
Transmit "send" to use "connected" send rather than sendto.
More...
This service is used to throw all socket errors which usually occur during the socket constructor.
More...
void
error (const char *err) const
This service is used to throw application defined socket errors where the application specific error code is a string.
More...
This service is used to turn the error handler on or off for "throwing" exceptions by manipulating the thrown flag.
More...
Used as the default destructor for ending a socket.
More...
Used as a common handler for connection failure processing.
More...
Set the send timeout for sending raw network data.
More...
Receive timeout for receiving raw network data.
More...
Set the protocol stack network kernel send buffer size associated with the socket.
More...
Set the protocol stack network kernel receive buffer size associated with the socket.
More...
Set the total protocol stack network kernel buffer size for both send and receive together.
More...
Setting multicast binds the multicast interface used for the socket to the interface the socket itself has been implicitly bound to.
More...
Set the multicast loopback flag for the socket.
More...
Set the multicast time to live for a multicast socket.
More...
Enable/disable delaying packets (Nagle algorithm)
More...
Process a logical input line from a socket descriptor directly.
More...
Static Protected Member Functions
See if a specific protocol family is available in the current runtime environment.
More...
Protected Attributes
union {
struct {
the actual socket descriptor, in Windows, unlike posix it
cannot be used as an file descriptor that way madness lies – jfc
More...
union {
struct {
the actual socket descriptor, in Windows, unlike posix it
cannot be used as an file descriptor that way madness lies – jfc
More...
Static Protected Attributes
Private Attributes
Detailed Description
A peer associated RTP socket pair for physically connected peer hosts.
This has no RTCP and assumes the receiver is connected to a known transmitter, hence no "foreign" packets will arrive.
- Author
- David Sugar RTP peer host over UDP.
Definition at line 72 of file ext.h.
Member Typedef Documentation
Member Enumeration Documentation
| Enumerator |
|---|
| errSuccess |
| errCreateFailed |
| errCopyFailed |
| errInput |
| errInputInterrupt |
| errResourceFailure |
| errOutput |
| errOutputInterrupt |
| errNotConnected |
| errConnectRefused |
| errConnectRejected |
| errConnectTimeout |
| errConnectFailed |
| errConnectInvalid |
| errConnectBusy |
| errConnectNoRoute |
| errBindingFailed |
| errBroadcastDenied |
| errRoutingDenied |
| errKeepaliveDenied |
| errServiceDenied |
| errServiceUnavailable |
| errMulticastDisabled |
| errTimeout |
| errNoDelay |
| errExtended |
| errLookupFail |
| errSearchErr |
| errInvalidValue |
Definition at line 131 of file socket.h.
| Enumerator |
|---|
| pendingInput |
| pendingOutput |
| pendingError |
Definition at line 174 of file socket.h.
| Enumerator |
|---|
| INITIAL |
| AVAILABLE |
| BOUND |
| CONNECTED |
| CONNECTING |
| STREAM |
Definition at line 182 of file socket.h.
rtp.h cc++/rtp.h
Type of network service the application uses.
If the application uses enhanced network service, for instance Integrated Services or Differentiated Services, it has not to ensure fair competition with TCP, provided that the requested service is actually being delivered. Whenever the application uses best-effort service or the requested enhanced service is not actually being delivered, it has to ensure fair competition with TCP. By default, best-effot is assumed.
- Note
- Although not required, RTP packets are always sent on top of UDP segments. No other underlying transport protocol is supported at present.
- Todo:
- implement fair competition with tcp
| Enumerator |
|---|
| tosBestEffort |
Best-effort network service.
|
| tosEnhanced |
Enhanced network service.
|
Definition at line 101 of file ioqueue.h.
| Enumerator |
|---|
| tosLowDelay |
| tosThroughput |
| tosReliability |
| tosMinCost |
| tosInvalid |
Definition at line 165 of file socket.h.
| Enumerator |
|---|
| tosLowDelay |
| tosThroughput |
| tosReliability |
| tosMinCost |
| tosInvalid |
Definition at line 165 of file socket.h.
Constructor & Destructor Documentation
- Parameters
-
bind network address this socket is to be bound
local transport port this socket is to be bound
remote peer transpor port
virtual RTPDuplex::~RTPDuplex
(
)
virtual |
Member Function Documentation
void ConflictHandler::addConflict
(
const
InetAddress &
na,
)
inherited |
void OutgoingDataQueue::addContributor
(
uint32
csrc )
inherited |
Add csrc as the CSRC identifier of a new contributor.
This method adds the CSRC identifier to a list of contributors that will be inserted in every packet enqueued from now on.
bool DestinationListHandler::addDestinationToList
(
const
InetAddress &
ia,
)
protectedinherited |
Locks the object before modifying it.
Error Socket::bufferSize
(
unsigned
size )
protectedinherited |
Set the total protocol stack network kernel buffer size for both send and receive together.
- Returns
- errSuccess on success
- Parameters
-
size of buffer.
Error Socket::bufferSize
(
unsigned
size )
protectedinherited |
Set the total protocol stack network kernel buffer size for both send and receive together.
- Returns
- errSuccess on success
- Parameters
-
size of buffer.
bool MembershipBookkeeping::BYESource
(
uint32
ssrc )
protectedinherited |
Mark the source identified by ssrc as having sent a BYE packet.
It is not deleted until a timeout expires, so that in case some packets from this source arrive a bit later the source is not inserted again in the table of known sources.
- Returns
- true if the source had been previously identified. false if it was not in the table of known sources.
static bool Socket::check
(
Family
fam )
staticinherited |
See if a specific protocol family is available in the current runtime environment.
- Returns
- true if family available.
static bool Socket::check
(
Family
fam )
staticinherited |
See if a specific protocol family is available in the current runtime environment.
- Returns
- true if family available.
bool IncomingDataQueue::checkSSRCInIncomingRTPPkt
(
SyncSourceLink &
sourceLink,
bool
is_new,
)
protectedinherited |
Apply collision and loop detection and correction algorithm when receiving RTP data packets.
Follows section 8.2 in draft-ietf-avt-rtp-new.
- Parameters
-
sourceLink link to the source object.
is_new whether the source has been just recorded.
na data packet network address.
tp data packet source transport port.
- Returns
- whether the packet must not be discarded.
- Parameters
-
host peer address
port peer port. If not specified, the same as the local is used
- Returns
- socket status
void UDPSocket::connect
(
const char *
service )
inherited |
void UDPSocket::connect
(
const char *
service )
inherited |
Associate this socket with a specified peer host.
The port number from the constructor will be used. All UDP packets will be sent to and received from the specified host.
- Returns
- 0 on success, -1 on error.
- Parameters
-
host address to connect socket to.
port to connect socket to.
Associate this socket with a subnet of peer hosts for subnet broadcasting.
The server must be able to assert broadcast permission for the socket.
- Returns
- 0 on success, -1 on error.
- Parameters
-
subnet subnet address to broadcast into.
port transport port to broadcast into.
Associate this socket with a multicast group.
- Returns
- 0 on success, -1 on error.
- Parameters
-
mgroup address of the multicast group to send to.
port port number
Associate this socket with a specified peer host.
The port number from the constructor will be used. All UDP packets will be sent received from the specified host.
- Returns
- 0 on success, -1 on error.
- Parameters
-
host host network address to connect socket to.
port host transport port to connect socket to.
Error Socket::connectError
(
void
)
protectedinherited |
Used as a common handler for connection failure processing.
- Returns
- correct failure code to apply.
Error Socket::connectError
(
void
)
protectedinherited |
Used as a common handler for connection failure processing.
- Returns
- correct failure code to apply.
void RTPDataQueue::disableStack
(
)
inlineinherited |
Disable packet queue processing in the stack.
Definition at line 132 of file ioqueue.h.
Error UDPSocket::disconnect
(
void
)
inherited |
Disassociate this socket from any host connection.
No data should be read or written until a connection is established.
Error UDPSocket::disconnect
(
void
)
inherited |
Disassociate this socket from any host connection.
No data should be read or written until a connection is established.
virtual size_t RTPQueueBase::dispatchBYE
(
const std::string &
)
inlineprotectedvirtualinherited |
A plugin point for posting of BYE messages.
- Parameters
-
- reason to leave the RTP session.
- Returns
- number of octets sent.
Reimplemented in QueueRTCPManager.
Definition at line 231 of file queuebase.h.
size_t OutgoingDataQueue::dispatchDataPacket
(
)
protectedinherited |
This function is used by the service thread to process the next outgoing packet pending in the sending queue.
- Returns
- number of bytes sent. 0 if silent, <0 if error.
This is used to write the RTP data packet to one or more destinations.
It is used by both sendImmediate and by dispatchDataPacket.
- Parameters
-
RTP packet to send.
void RTPDataQueue::enableStack
(
)
inlineinherited |
Enable packet queue processing in the stack.
This method will not any thread of execution.
Definition at line 126 of file ioqueue.h.
|
inlineprotectedvirtualinherited |
void RTPDataQueue::endQueue
(
)
protectedinherited |
This method ends the queue.
void UDPReceive::endReceiver
(
void
)
inlineprotectedinherited |
void Socket::endSocket
(
void
)
protectedinherited |
Used as the default destructor for ending a socket.
This will cleanly terminate the socket connection. It is provided for use in derived virtual destructors.
void Socket::endSocket
(
void
)
protectedinherited |
Used as the default destructor for ending a socket.
This will cleanly terminate the socket connection. It is provided for use in derived virtual destructors.
void UDPTransmit::endTransmitter
(
void
)
inlineprotectedinherited |
const char *
err = NULL,
long
systemError = 0
)
const
protectedinherited |
This service is used to throw all socket errors which usually occur during the socket constructor.
- Parameters
-
error defined socket error id.
err string or message to pass.
systemError the system error# that caused the error
const char *
err = NULL,
long
systemError = 0
)
const
protectedinherited |
This service is used to throw all socket errors which usually occur during the socket constructor.
- Parameters
-
error defined socket error id.
err string or message to pass.
systemError the system error# that caused the error
void Socket::error
(
const char *
err )
const
inlineprotectedinherited |
This service is used to throw application defined socket errors where the application specific error code is a string.
- Parameters
-
err string or message to pass.
Definition at line 240 of file socket.h.
void Socket::error
(
const char *
err )
const
inlineprotectedinherited |
This service is used to throw application defined socket errors where the application specific error code is a string.
- Parameters
-
err string or message to pass.
Definition at line 240 of file socket.h.
PayloadType RTPQueueBase::getCurrentPayloadType
(
)
const
inlineinherited |
uint32 RTPQueueBase::getCurrentRTPClockRate
(
)
const
inlineinherited |
Get the clock rate in RTP clock units (for instance, 8000 units per second for PCMU, or 90000 units per second for MP2T).
This value depends on what payload format has been selected using setPayloadFormat().
- Returns
- clock rate in RTP clock units.
Definition at line 198 of file queuebase.h.
uint32 OutgoingDataQueue::getCurrentSeqNum
(
void
)
inlineprotectedinherited |
uint32 RTPDataQueue::getCurrentTimestamp
(
)
const
inherited |
Get the timestamp that should be given for a packet whose payload sampling instant corresponds to the current system time.
The timestamp applications should provide for each packet represents the sampling instant of its payload and should not be a reading of the system clock. Nevertheless, the internal operation of the RTP stack relies on the accuracy of the provided timestamp, since several computations assume that there is a certain degree of correspondence between the timestamp and the system clock.
It is recommended that applications use this method in order to periodically adjust the RTP timestamp.
In particular, it is advisable getting the timestamp corresponding to the first sampling instant or any instant after a period of inactivity through a call to this method.
Applications should use the nominal sampling or any other value provided by the coder in order to compute the next timestamps with minimum computational requirement.
For instance, an application using an RTP profile that specifies a fixed sampling rate of 8 Khz with eight bits per sample, continuously transmitting audio blocks 80 octets long, would transmit 100 packets every second. Every packet would carry a timestamp 80 units greater than the previous one. So, the first timestamp would be obtained from this method, whereas the following ones would be computed adding 80 every time. Also the timestamp should be increased for every block whether it is put in the queue or dropped.
The aforementioned increment can be obtained from the RTPDataQueue::getTimestampIncrement() method rather than computing it by hand in the application.
- Note
- Frame based applications must follow a specific timestamping method, probably specified in a profile.
-
You should take into account that by default ccRTP assumes that the application begins sampling at the queue creation time. Moreover, the first sampling instant is assigned a "user visible" timestamp of 0, although the RTP stack will then add internally a ramdom offset unknown to the application. That is to say, the application may count samples from 0 in order to get the timestamp for the next packet, provided that the first sampling instant is the same as the queue creation time. Nevertheless, this simpler way of starting will not be as accurate as it would be if the application got at least the first timestamp through getCurrentTimestamp. We provide this option since ccRTP interface is evolving, but we admit that it is ugly, we could remove this option or even replace uint32 timestamps with a restrictively regulated object; suggestions are gladly welcomed
const
AppDataUnit* IncomingDataQueue::getData
(
uint32
stamp,
)
inherited |
Retreive data from a specific timestamped packet if such a packet is currently available in the receive buffer.
- Parameters
-
stamp Data unit timestamp.
src Optional synchronization source selector.
- Returns
- data retrieved from the reception buffer.
- Return values
-
null pointer if no packet with such timestamp is available.
uint16 IncomingDataQueue::getDefaultMaxPacketDropout
(
)
const
inlineinherited |
uint16 IncomingDataQueue::getDefaultMaxPacketMisorder
(
)
const
inlineinherited |
size_t IncomingDataQueueBase::getDefaultMaxRecvPacketSize
(
)
const
inlineinherited |
size_t OutgoingDataQueueBase::getDefaultMaxSendSegmentSize
(
)
inlineinherited |
size_t MembershipBookkeeping::getDefaultMembersHashSize
(
)
inlineinherited |
static size_t IncomingDataQueue::getDefaultMembersSize
(
)
inlinestaticinherited |
uint8 IncomingDataQueue::getDefaultMinValidPacketSequence
(
)
const
inlineinherited |
microtimeout_t OutgoingDataQueue::getDefaultSchedulingTimeout
(
)
const
inlineinherited |
uint32 RTPDataQueue::getDefaultSessionBandwidth
(
)
const
inlineinherited |
Error Socket::getErrorNumber
(
void
)
const
inlineinherited |
Often used by a "catch" to fetch the last error of a thrown socket.
- Returns
- error number of Error error.
Definition at line 668 of file socket.h.
Error Socket::getErrorNumber
(
void
)
const
inlineinherited |
Often used by a "catch" to fetch the last error of a thrown socket.
- Returns
- error number of Error error.
Definition at line 668 of file socket.h.
const char* Socket::getErrorString
(
void
)
const
inlineinherited |
Often used by a "catch" to fetch the user set error string of a thrown socket, but only if EXTENDED error codes are used.
- Returns
- string for error message.
Definition at line 676 of file socket.h.
const char* Socket::getErrorString
(
void
)
const
inlineinherited |
Often used by a "catch" to fetch the user set error string of a thrown socket, but only if EXTENDED error codes are used.
- Returns
- string for error message.
Definition at line 676 of file socket.h.
uint32 IncomingDataQueue::getFirstTimestamp
(
const
SyncSource *
src =
NULL )
const
inherited |
Get timestamp of first packet waiting in the queue.
- Parameters
-
src optional source selector.
- Returns
- timestamp of first arrival packet.
timeval RTPQueueBase::getInitialTime
(
)
const
inlineinherited |
uint32 OutgoingDataQueue::getInitialTimestamp
(
)
inlineprotectedinherited |
CryptoContext* IncomingDataQueue::getInQueueCryptoContext
(
uint32
ssrc )
inherited |
int &
InterfaceIndex
)
inherited |
get the interface index for a named network device
- Parameters
-
ethX is device name, like "eth0" or "eth1"
InterfaceIndex is the index value returned by os
- Todo:
- Win32 and ipv6 specific implementation.
int &
InterfaceIndex
)
inherited |
get the interface index for a named network device
- Parameters
-
ethX is device name, like "eth0" or "eth1"
InterfaceIndex is the index value returned by os
- Todo:
- Win32 and ipv6 specific implementation.
Get the local address and port number this socket is currently bound to.
- Parameters
-
port ptr to port number on local host.
- Returns
- host address of interface this socket is bound to.
Get the local address and port number this socket is currently bound to.
- Parameters
-
port ptr to port number on local host.
- Returns
- host address of interface this socket is bound to.
Perform NAT table lookup for this socket.
Used to allow an application to know the original ip:port pair the the client "thinks" it is connecting to. Used mostly to transparently impersonate a remote server/service.
On error, 0.0.0.0:0 is returned and one of the following error codes is set: errServiceUnavailable - if nat is not supported on the current platform or if it was not compiled; errLookupFail - if the nat syscall failed for some reason (extended error code); errSearchErr - if the socket does not have nat information (i.e. is not nated).
NAT lookup is supported on NetFilter for ipv4 and ipv6 (Linux), IPFilter for ipv4 (Solaris, *BSD except OpenBSD, HP-UX, etc.) and Packet Filter for ipv4 and ipv6 (OpenBSD). When using IPFilter or Packet Filter, the first NAT lookup must be performed as root (the NAT device is read only for root and is opened once, unless an error occurs). Permissions on the nat device may be changed to solve this.
- Warning
- When using IPFilter and Packet Filter, application data model must be the same as the running kernel (32/64 bits).
- Parameters
-
port ptr to NATed port number on local host.
- Returns
- NATed host address that this socket is related to.
Perform NAT table lookup for this socket.
Used to allow an application to know the original ip:port pair the the client "thinks" it is connecting to. Used mostly to transparently impersonate a remote server/service.
On error, 0.0.0.0:0 is returned and one of the following error codes is set: errServiceUnavailable - if nat is not supported on the current platform or if it was not compiled; errLookupFail - if the nat syscall failed for some reason (extended error code); errSearchErr - if the socket does not have nat information (i.e. is not nated).
NAT lookup is supported on NetFilter for ipv4 and ipv6 (Linux), IPFilter for ipv4 (Solaris, *BSD except OpenBSD, HP-UX, etc.) and Packet Filter for ipv4 and ipv6 (OpenBSD). When using IPFilter or Packet Filter, the first NAT lookup must be performed as root (the NAT device is read only for root and is opened once, unless an error occurs). Permissions on the nat device may be changed to solve this.
- Warning
- When using IPFilter and Packet Filter, application data model must be the same as the running kernel (32/64 bits).
- Parameters
-
port ptr to NATed port number on local host.
- Returns
- NATed host address that this socket is related to.
Examine address of sender of next waiting packet.
This also sets "peer" address to the sender so that the next "send" message acts as a "reply". This additional behavior overides the standard socket getSender behavior.
- Parameters
-
port pointer to hold port number.
Examine address of sender of next waiting packet.
This also sets "peer" address to the sender so that the next "send" message acts as a "reply". This additional behavior overides the standard socket getSender behavior.
- Parameters
-
port pointer to hold port number.
May be used to examine the origin of data waiting in the socket receive queue.
This can tell a TCP server where pending "connect" requests are coming from, or a UDP socket where it's next packet arrived from.
- Parameters
-
port ptr to port number of sender.
- Returns
- host address, test with "isInetAddress()".
Reimplemented in DCCPSocket.
uint32 RTPQueueBase::getLocalSSRC
(
)
const
inlineinherited |
uint32 RTPQueueBase::getLocalSSRCNetwork
(
)
const
inlineprotectedinherited |
bool OutgoingDataQueue::getMark
(
)
const
inlineinherited |
Get wheter the mark bit will be set in the next packet.
Definition at line 340 of file oqueue.h.
uint16 IncomingDataQueue::getMaxPacketDropout
(
)
const
inlineinherited |
uint16 IncomingDataQueue::getMaxPacketMisorder
(
)
const
inlineinherited |
size_t IncomingDataQueueBase::getMaxRecvPacketSize
(
)
const
inlineinherited |
size_t OutgoingDataQueueBase::getMaxSendSegmentSize
(
)
inlineinherited |
uint32 MembershipBookkeeping::getMembersCount
(
)
inlineprotectedinherited |
uint8 IncomingDataQueue::getMinValidPacketSequence
(
)
const
inlineinherited |
Get the minimun number of consecutive packets that must be received from a source before accepting its data packets.
Definition at line 1010 of file iqueue.h.
size_t RTPDuplex::getNextDataPacketSize
(
)
const
inlineprotectedvirtual |
CryptoContext* OutgoingDataQueue::getOutQueueCryptoContext
(
uint32
ssrc )
inherited |
- Returns
- the associated peer information
SOCKET UDPReceive::getReceiver
(
void
)
const
inlineprotectedinherited |
This computes the timeout period for scheduling transmission of the next packet at the "head" of the send buffer.
If no packets are waiting, a default timeout is used. This actually forms the "isPending()" timeout of the rtp receiver in the service thread.
- Returns
- timeout until next packet is scheduled to send.
uint32 MembershipBookkeeping::getSendersCount
(
)
inlineprotectedinherited |
uint32 OutgoingDataQueue::getSendOctetCount
(
)
const
inlineinherited |
Get the total number of octets (payload only) sent so far.
- Returns
- total number of payload octets sent in RTP packets.
Definition at line 403 of file oqueue.h.
uint32 OutgoingDataQueue::getSendPacketCount
(
)
const
inlineinherited |
Get the total number of packets sent so far.
- Returns
- total number of packets sent
Definition at line 394 of file oqueue.h.
uint16 OutgoingDataQueue::getSequenceNumber
(
)
const
inlineinherited |
Get the sequence number of the next outgoing packet.
- Returns
- the 16 bit sequence number.
Definition at line 412 of file oqueue.h.
uint32 RTPDataQueue::getSessionBandwidth
(
)
const
inlineinherited |
bool &
created
)
protectedinherited |
Get the description of a source by its ssrc identifier.
- Parameters
-
ssrc SSRC identifier, in host order.
created whether a new source has been created.
- Returns
- Pointer to the SyncSource object identified by
ssrc.
long Socket::getSystemError
(
void
)
const
inlineinherited |
long Socket::getSystemError
(
void
)
const
inlineinherited |
const char* Socket::getSystemErrorString
(
void
)
const
inherited |
const char* Socket::getSystemErrorString
(
void
)
const
inherited |
timeout_t RTPDataQueue::getTimeclock
(
)
const
inlineinherited |
Get the packet timeclock for synchronizing timestamps.
- Returns
- runtime in milliseconds since last set.
Definition at line 238 of file ioqueue.h.
SOCKET UDPTransmit::getTransmitter
(
void
)
inlineprotectedinherited |
This is used to fetch a packet in the receive queue and to expire packets older than the current timestamp.
- Returns
- packet buffer object for current timestamp if found.
- Parameters
-
timestamp timestamp requested.
src optional source selector
- Note
- if found, the packet is removed from the reception queue
Insert a just received packet in the queue (both general and source specific queues).
If the packet was already in the queue (same SSRC and sequence number), it is not inserted but deleted.
- Parameters
-
packetLink link to a packet just received and generally validated and processed by onRTPPacketRecv.
- Returns
- whether the packet was successfully inserted.
- Return values
-
false when the packet is duplicated (there is already a packet from the same source with the same timestamp).
true when the packet is not duplicated.
bool RTPDataQueue::isActive
(
void
)
const
inlineinherited |
Get active connection state flag.
- Returns
- true if connection "active".
Definition at line 141 of file ioqueue.h.
bool Socket::isActive
(
void
)
const
inherited |
Test to see if the socket is at least operating or if it is mearly initialized.
"initialized" sockets may be the result of failed constructors.
- Returns
- true if not in initial state.
bool Socket::isActive
(
void
)
const
inherited |
Test to see if the socket is at least operating or if it is mearly initialized.
"initialized" sockets may be the result of failed constructors.
- Returns
- true if not in initial state.
bool Socket::isBroadcast
(
void
)
const
inlineinherited |
Return if broadcast has been enabled for the specified socket.
- Returns
- true if broadcast socket.
Definition at line 651 of file socket.h.
bool Socket::isBroadcast
(
void
)
const
inlineinherited |
Return if broadcast has been enabled for the specified socket.
- Returns
- true if broadcast socket.
Definition at line 651 of file socket.h.
bool Socket::isConnected
(
void
)
const
inherited |
Can test to see if this socket is "connected", and hence whether a "catch" can safely call getPeer().
Of course, an unconnected socket will return a 0.0.0.0 address from getPeer() as well.
- Returns
- true when socket is connected to a peer.
bool Socket::isConnected
(
void
)
const
inherited |
Can test to see if this socket is "connected", and hence whether a "catch" can safely call getPeer().
Of course, an unconnected socket will return a 0.0.0.0 address from getPeer() as well.
- Returns
- true when socket is connected to a peer.
See if input queue has data packets available.
- Returns
- true if data packets available.
- Parameters
-
timeout in milliseconds.
Definition at line 1318 of file socket.h.
bool MembershipBookkeeping::isMine
(
const
SyncSource &
source )
const
inlineprotectedinherited |
Get whether a synchronization source is recorded in this membership controller.
Definition at line 345 of file iqueue.h.
bool UDPTransmit::isOutputReady
(
unsigned long
timeout = 0l )
inlineinherited |
See if output queue is empty for sending more packets.
- Returns
- true if output available.
- Parameters
-
timeout in milliseconds to wait.
Definition at line 1207 of file socket.h.
virtual bool Socket::isPending
(
Pending
pend,
)
virtualinherited |
Get the status of pending operations.
This can be used to examine if input or output is waiting, or if an error has occured on the descriptor.
- Returns
- true if ready, false on timeout.
- Parameters
-
pend ready check to perform.
timeout in milliseconds, inf. if not specified.
Reimplemented in SimpleTCPStream, TCPStream, and UnixStream.
- Parameters
-
timeout how much time to wait for new data
- Returns
- if there is some new data
Implements RTPDataQueue.
Definition at line 105 of file ext.h.
bool UDPReceive::isPendingReceive
(
timeout_t
timeout )
inlineprotectedinherited |
Check for pending data.
- Returns
- true if data is waiting.
- Parameters
-
timeout in milliseconds.
Definition at line 1267 of file socket.h.
bool MembershipBookkeeping::isRegistered
(
uint32
ssrc )
protectedinherited |
Returns whether there is already a synchronizacion source with "ssrc" SSRC identifier.
bool Socket::isRouted
(
void
)
const
inlineinherited |
Return if socket routing is enabled.
- Returns
- true if routing enabled.
Definition at line 659 of file socket.h.
bool Socket::isRouted
(
void
)
const
inlineinherited |
Return if socket routing is enabled.
- Returns
- true if routing enabled.
Definition at line 659 of file socket.h.
bool OutgoingDataQueue::isSending
(
)
const
inherited |
Determine if outgoing packets are waiting to send.
- Returns
- true if there are packets waiting to be send.
bool DestinationListHandler::isSingleDestination
(
)
const
inlineinherited |
Get whether there is only a destination in the list.
Definition at line 82 of file oqueue.h.
bool IncomingDataQueue::isWaiting
(
const
SyncSource *
src =
NULL )
const
inherited |
Determine if packets are waiting in the reception queue.
- Parameters
-
src Optional synchronization source selector.
- Returns
- True if packets are waiting.
int
InterfaceIndex
)
inherited |
join a multicast group on a particular interface
- Parameters
-
ia is the multicast address to use
InterfaceIndex is the index value returned by getInterfaceIndex
- Todo:
- Win32 and ipv6 specific implementation.
int
InterfaceIndex
)
inherited |
join a multicast group on a particular interface
- Parameters
-
ia is the multicast address to use
InterfaceIndex is the index value returned by getInterfaceIndex
- Todo:
- Win32 and ipv6 specific implementation.
void DestinationListHandler::lockDestinationList
(
)
const
inlineinherited |
|
inlineprotectedvirtualinherited |
A hook to filter packets in the receive queue that are being expired.
This hook may be used to do some application specific processing on expired packets before they are deleted.
- Parameters
-
- packet expired from the recv queue.
Definition at line 1217 of file iqueue.h.
virtual void IncomingDataQueue::onNewSyncSource
(
const
SyncSource &
)
inlineprotectedvirtualinherited |
Virtual called when a new synchronization source has joined the session.
- Parameters
-
- new synchronization source
Definition at line 1185 of file iqueue.h.
|
inlineprotectedvirtualinherited |
A virtual function to support parsing of arriving packets to determine if they should be kept in the queue and to dispatch events.
A generic header validity check (as specified in RFC 1889) is performed on every incoming packet. If the generic check completes succesfully, this method is called before the packet is actually inserted into the reception queue.
May be used to perform additional validity checks or to do some application specific processing.
- Parameters
-
- packet just received.
- Returns
- true if packet is kept in the incoming packets queue.
Definition at line 1206 of file iqueue.h.
virtual bool IncomingDataQueue::onSRTPPacketError
(
IncomingRTPPkt &
pkt,
int32
errorCode
)
inlineprotectedvirtualinherited |
A hook that gets called if the decoding of an incoming SRTP was erroneous.
- Parameters
-
pkt The SRTP packet with error.
errorCode The error code: -1 - SRTP authentication failure, -2 - replay check failed
- Returns
- True: put the packet in incoming queue for further processing by the applications; false: dismiss packet. The default implementation returns false.
Reimplemented in ZrtpQueue.
Definition at line 1234 of file iqueue.h.
bool Socket::operator!
(
)
const
inherited |
Operator based testing to see if a socket is currently active.
bool Socket::operator!
(
)
const
inherited |
Operator based testing to see if a socket is currently active.
ssize_t UDPSocket::peek
(
void *
buf,
size_t
len
)
inlineinherited |
Examine contents of next waiting packet.
- Parameters
-
buf pointer to packet buffer for contents.
len of packet buffer.
- Returns
- number of bytes examined.
Definition at line 1028 of file socket.h.
ssize_t UDPSocket::peek
(
void *
buf,
size_t
len
)
inlineinherited |
Examine contents of next waiting packet.
- Parameters
-
buf pointer to packet buffer for contents.
len of packet buffer.
- Returns
- number of bytes examined.
Definition at line 1028 of file socket.h.
void IncomingDataQueue::purgeIncomingQueue
(
)
protectedinherited |
void OutgoingDataQueue::purgeOutgoingQueue
(
)
protectedinherited |
void OutgoingDataQueue::putData
(
uint32
stamp,
const unsigned char *
data = NULL,
size_t
len = 0
)
inherited |
This is used to create a data packet in the send queue.
Sometimes a "NULL" or empty packet will be used instead, and these are known as "silent" packets. "Silent" packets are used simply to "push" the scheduler along more accurately by giving the appearence that a next packet is waiting to be sent and to provide a valid timestamp for that packet.
- Parameters
-
stamp Timestamp for expected send time of packet.
data Value or NULL if special "silent" packet.
len May be 0 to indicate a default by payload type.
virtual ssize_t Socket::readData
(
void *
buf,
size_t
len,
char
separator = 0,
)
protectedvirtualinherited |
Read in a block of len bytes with specific separator.
Can be zero, or any other char. If \n or \r, it's treated just like a readLine(). Otherwise it looks for the separator.
- Parameters
-
buf pointer to byte allocation.
len maximum length to read.
separator separator for a particular ASCII character
t timeout for pending data in milliseconds.
- Returns
- number of bytes actually read.
ssize_t Socket::readLine
(
char *
buf,
size_t
len,
)
protectedinherited |
Process a logical input line from a socket descriptor directly.
- Parameters
-
buf pointer to string.
len maximum length to read.
timeout for pending data in milliseconds.
- Returns
- number of bytes actually read.
ssize_t Socket::readLine
(
char *
buf,
size_t
len,
)
protectedinherited |
Process a logical input line from a socket descriptor directly.
- Parameters
-
buf pointer to string.
len maximum length to read.
timeout for pending data in milliseconds.
- Returns
- number of bytes actually read.
ssize_t UDPSocket::receive
(
void *
buf,
size_t
len,
bool
reply = false
)
inherited |
Receive a message from any host.
- Parameters
-
buf pointer to packet buffer to receive.
len of packet buffer to receive.
reply save sender address for reply if true.
- Returns
- number of bytes received.
ssize_t UDPSocket::receive
(
void *
buf,
size_t
len,
bool
reply = false
)
inherited |
Receive a message from any host.
- Parameters
-
buf pointer to packet buffer to receive.
len of packet buffer to receive.
reply save sender address for reply if true.
- Returns
- number of bytes received.
ssize_t UDPReceive::receive
(
void *
buf,
size_t
len
)
inlineinherited |
Receive a data packet from the connected peer host.
- Returns
- num of bytes actually received.
- Parameters
-
buf address of data receive buffer.
len size of data receive buffer.
Definition at line 1309 of file socket.h.
Error Socket::receiveBuffer
(
unsigned
size )
protectedinherited |
Set the protocol stack network kernel receive buffer size associated with the socket.
- Returns
- errSuccess on success, or error.
- Parameters
-
size of buffer in bytes.
Error Socket::receiveBuffer
(
unsigned
size )
protectedinherited |
Set the protocol stack network kernel receive buffer size associated with the socket.
- Returns
- errSuccess on success, or error.
- Parameters
-
size of buffer in bytes.
Error Socket::receiveLimit
(
int
limit =
1 )
protectedinherited |
Error Socket::receiveLimit
(
int
limit =
1 )
protectedinherited |
Receive timeout for receiving raw network data.
- Returns
- errSuccess if set.
- Parameters
-
timer value in milliseconds.
Receive timeout for receiving raw network data.
- Returns
- errSuccess if set.
- Parameters
-
timer value in milliseconds.
void IncomingDataQueue::recordExtraction
(
const
IncomingRTPPkt &
pkt )
protectedinherited |
Log extraction of a packet from this source from the scheduled reception queue.
- Parameters
-
pkt Packet extracted from the queue.
const timeval
recvtime
)
protectedinherited |
Log reception of a new RTP packet from this source.
Usually updates data such as the packet counter, the expected sequence number for the next packet and the time the last packet was received at.
- Parameters
-
srcLink Link structure for the synchronization source of this packet.
pkt Packet just created and to be logged.
recvtime Reception time.
- Returns
- whether, according to the source state and statistics, the packet is considered valid and must be inserted in the incoming packets queue.
size_t RTPDuplex::recvData
(
unsigned char *
buffer,
size_t
len,
)
inlineprotectedvirtual |
- Parameters
-
buffer where to store the retrieved data
len how many octets to read
na Source network address.
tp Source transport port.
- Returns
- number of octets read
Implements IncomingDataQueue.
Definition at line 125 of file ext.h.
bool OutgoingDataQueue::removeContributor
(
uint32
csrc )
inherited |
Remove CSRC from the list of contributors.
bool DestinationListHandler::removeDestinationFromList
(
const
InetAddress &
ia,
)
protectedinherited |
Locks the object before modifying it.
void IncomingDataQueue::removeInQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Remove input queue CryptoContext.
The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.
- Parameters
-
void OutgoingDataQueue::removeOutQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Remove output queue CryptoContext.
The endQueue method (provided by RTPQueue) also deletes all registered CryptoContexts.
- Parameters
-
bool MembershipBookkeeping::removeSource
(
uint32
ssrc )
protectedinherited |
Remove the description of the source identified by ssrc
- Returns
- whether the source has been actually removed or it did not exist.
void RTPDataQueue::renewLocalSSRC
(
)
inlineprotectedvirtualinherited |
- Parameters
-
na Inet network address.
ctp Data transport port.
- Parameters
-
na Inet network address.
dtp Data transport port.
ssize_t UDPSocket::send
(
const void *
buf,
size_t
len
)
inherited |
Send a message packet to a peer host.
- Parameters
-
buf pointer to packet buffer to send.
len of packet buffer to send.
- Returns
- number of bytes sent.
ssize_t UDPTransmit::send
(
const void *
buf,
size_t
len
)
inlineprotectedinherited |
Transmit "send" to use "connected" send rather than sendto.
- Returns
- number of bytes sent.
- Parameters
-
buf address of buffer to send.
len of bytes to send.
Definition at line 1165 of file socket.h.
Error Socket::sendBuffer
(
unsigned
size )
protectedinherited |
Set the protocol stack network kernel send buffer size associated with the socket.
- Returns
- errSuccess on success, or error.
- Parameters
-
size of buffer in bytes.
Error Socket::sendBuffer
(
unsigned
size )
protectedinherited |
Set the protocol stack network kernel send buffer size associated with the socket.
- Returns
- errSuccess on success, or error.
- Parameters
-
size of buffer in bytes.
size_t RTPDuplex::sendData
(
const unsigned char *const
buffer,
size_t
len
)
inlineprotectedvirtual |
- Parameters
-
buffer pointer to data to be written
len how many octets to write
- Returns
- number of octets written
Reimplemented from OutgoingDataQueue.
Definition at line 114 of file ext.h.
void OutgoingDataQueue::sendImmediate
(
uint32
stamp,
const unsigned char *
data = NULL,
size_t
len = 0
)
inherited |
This is used to create a data packet and send it immediately.
Sometimes a "NULL" or empty packet will be used instead, and these are known as "silent" packets. "Silent" packets are used simply to "push" the scheduler along more accurately by giving the appearence that a next packet is waiting to be sent and to provide a valid timestamp for that packet.
- Parameters
-
stamp Timestamp immediate send time of packet.
data Value or NULL if special "silent" packet.
len May be 0 to indicate a default by payload type.
Error Socket::sendLimit
(
int
limit =
2048 )
protectedinherited |
Error Socket::sendLimit
(
int
limit =
2048 )
protectedinherited |
Set the send timeout for sending raw network data.
- Returns
- errSuccess if set.
- Parameters
-
timer value in millisec.
Set the send timeout for sending raw network data.
- Returns
- errSuccess if set.
- Parameters
-
timer value in millisec.
Error Socket::setBroadcast
(
bool
enable )
protectedinherited |
Set the subnet broadcast flag for the socket.
This enables sending to a subnet and may require special image privileges depending on the operating system.
- Returns
- 0 (errSuccess) on success, else error code.
- Parameters
-
enable when set to true.
Error UDPTransmit::setBroadcast
(
bool
enable )
inlineinherited |
void Socket::setCompletion
(
bool
immediate )
inherited |
Used to specify blocking mode for the socket.
A socket can be made non-blocking by setting setCompletion(false) or set to block on all access with setCompletion(true). I do not believe this form of non-blocking socket I/O is supported in winsock, though it provides an alternate asynchronous set of socket services.
- Parameters
-
immediate mode specify socket I/O call blocking mode.
void Socket::setCompletion
(
bool
immediate )
inherited |
Used to specify blocking mode for the socket.
A socket can be made non-blocking by setting setCompletion(false) or set to block on all access with setCompletion(true). I do not believe this form of non-blocking socket I/O is supported in winsock, though it provides an alternate asynchronous set of socket services.
- Parameters
-
immediate mode specify socket I/O call blocking mode.
- Parameters
-
- peer host network address.
- peer host RTCP transport port.
Reimplemented from OutgoingDataQueue.
Definition at line 143 of file ext.h.
void SyncSourceHandler::setControlTransportPort
(
SyncSource &
source,
)
inlineinherited |
- Parameters
-
- peer host network address.
- peer host RTP data transport port.
Reimplemented from OutgoingDataQueue.
Definition at line 135 of file ext.h.
void SyncSourceHandler::setDataTransportPort
(
SyncSource &
source,
)
inlineinherited |
void Socket::setError
(
bool
enable )
inlineprotectedinherited |
This service is used to turn the error handler on or off for "throwing" exceptions by manipulating the thrown flag.
- Parameters
-
enable true to enable handler.
Definition at line 249 of file socket.h.
void Socket::setError
(
bool
enable )
inlineprotectedinherited |
This service is used to turn the error handler on or off for "throwing" exceptions by manipulating the thrown flag.
- Parameters
-
enable true to enable handler.
Definition at line 249 of file socket.h.
Set the "expired" timer for expiring packets pending in the send queue which have gone unsent and are already "too late" to be sent now.
- Parameters
-
to timeout to expire unsent packets in milliseconds.
Definition at line 382 of file oqueue.h.
void OutgoingDataQueue::setInitialTimestamp
(
uint32
ts )
inlineprotectedinherited |
void IncomingDataQueue::setInQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Set input queue CryptoContext.
The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
- Parameters
-
Error Socket::setLinger
(
bool
linger )
inherited |
Enable lingering sockets on close.
- Parameters
-
linger specify linger enable.
Error Socket::setLinger
(
bool
linger )
inherited |
Enable lingering sockets on close.
- Parameters
-
linger specify linger enable.
void SyncSourceHandler::setLink
(
SyncSource &
source,
void *
link
)
inlineinherited |
void RTPQueueBase::setLocalSSRC
(
uint32
ssrc )
inlineprotectedinherited |
Error UDPSocket::setLoopback
(
bool
enable )
inlineinherited |
Set the loopback.
Definition at line 937 of file socket.h.
Error UDPSocket::setLoopback
(
bool
enable )
inlineinherited |
Set the loopback.
Definition at line 937 of file socket.h.
Error Socket::setLoopbackByFamily
(
bool
enable,
)
protectedinherited |
Set the multicast loopback flag for the socket.
Loopback enables a socket to hear what it is sending.
- Returns
- 0 (errSuccess) on success, else error code.
- Parameters
-
enable when set to true.
family of protocol.
Error Socket::setLoopbackByFamily
(
bool
enable,
)
protectedinherited |
Set the multicast loopback flag for the socket.
Loopback enables a socket to hear what it is sending.
- Returns
- 0 (errSuccess) on success, else error code.
- Parameters
-
enable when set to true.
family of protocol.
void OutgoingDataQueue::setMark
(
bool
mark )
inlineinherited |
Set marker bit for the packet in which the next data provided will be send.
When transmitting audio, should be set for the first packet of a talk spurt. When transmitting video, should be set for the last packet for a video frame.
- Parameters
-
mark Marker bit value for next packet.
Definition at line 334 of file oqueue.h.
void IncomingDataQueue::setMaxPacketDropout
(
uint16
packets )
inlineinherited |
It also prevents packets sent after a restart of the source being immediately accepted.
Definition at line 1031 of file iqueue.h.
void IncomingDataQueue::setMaxPacketMisorder
(
uint16
packets )
inlineinherited |
void IncomingDataQueueBase::setMaxRecvPacketSize
(
size_t
maxsize )
inlineinherited |
- Parameters
-
- Note
- This method sets a filter for incoming packets. Setting higher values does not necessarily imply higher memory usage (this method does not set any buffer size).
Definition at line 319 of file queuebase.h.
void OutgoingDataQueueBase::setMaxSendSegmentSize
(
size_t
size )
inlineinherited |
Set maximum payload segment size before fragmenting sends.
- Parameters
-
size Maximum payload size.
- Returns
- Whether segment size was successfully set.
Definition at line 272 of file queuebase.h.
void MembershipBookkeeping::setMembersCount
(
uint32
n )
inlineprotectedinherited |
void IncomingDataQueue::setMinValidPacketSequence
(
uint8
packets )
inlineinherited |
When receiving packets from a new source, it may be convenient to reject a first few packets before we are really sure the source is valid.
This method sets how many data packets must be received in sequence before the source is considered valid and the stack starts to accept its packets.
- Note
- the default (see defaultMinValidPacketSequence()) value for this parameter is 0, so that no packets are rejected (data packets are accepted from the first one).
-
this validation is performed after the generic header validation and the additional validation done in onRTPPacketRecv().
-
if any valid RTCP packet is received from this source, it will be immediatly considered valid regardless of the number of sequential data packets received.
- Parameters
-
packets number of sequential packet required
Definition at line 998 of file iqueue.h.
Error UDPTransmit::setMulticast
(
bool
enable )
inlineprotectedinherited |
Error UDPReceive::setMulticast
(
bool
enable )
inlineprotectedinherited |
Error Socket::setMulticastByFamily
(
bool
enable,
)
protectedinherited |
Setting multicast binds the multicast interface used for the socket to the interface the socket itself has been implicitly bound to.
It is also used as a check flag to make sure multicast is enabled before multicast operations are used.
- Returns
- 0 (errSuccess) on success, else error code.
- Parameters
-
enable when set to true.
family of protocol.
Error Socket::setMulticastByFamily
(
bool
enable,
)
protectedinherited |
Setting multicast binds the multicast interface used for the socket to the interface the socket itself has been implicitly bound to.
It is also used as a check flag to make sure multicast is enabled before multicast operations are used.
- Returns
- 0 (errSuccess) on success, else error code.
- Parameters
-
enable when set to true.
family of protocol.
void SyncSourceHandler::setNetworkAddress
(
SyncSource &
source,
)
inlineinherited |
void OutgoingDataQueue::setNextSeqNum
(
uint32
seqNum )
inlineprotectedinherited |
For thoses cases in which the application requires a method to set the sequence number for the outgoing stream (such as for implementing the RTSP PLAY command).
- Parameters
-
seqNum next sequence number to be used for outgoing packets.
Definition at line 521 of file oqueue.h.
Error Socket::setNoDelay
(
bool
enable )
protectedinherited |
Enable/disable delaying packets (Nagle algorithm)
- Returns
- 0 on success.
- Parameters
-
enable disable Nagle algorithm when set to true.
Error Socket::setNoDelay
(
bool
enable )
protectedinherited |
Enable/disable delaying packets (Nagle algorithm)
- Returns
- 0 on success.
- Parameters
-
enable disable Nagle algorithm when set to true.
void OutgoingDataQueue::setOutQueueCryptoContext
(
CryptoContext *
cc )
inherited |
Set ouput queue CryptoContext.
The endQueue method (provided by RTPQueue) deletes all registered CryptoContexts.
- Parameters
-
void OutgoingDataQueue::setPadding
(
uint8
paddinglen )
inlineinherited |
Set padding.
All outgoing packets will be transparently padded to a multiple of paddinglen.
- Parameters
-
paddinglen pad packets to a length multiple of paddinglen.
Definition at line 323 of file oqueue.h.
size_t OutgoingDataQueue::setPartial
(
uint32
timestamp,
unsigned char *
data,
size_t
offset,
size_t
max
)
inherited |
Set partial data for an already queued packet.
This is often used for multichannel data.
- Parameters
-
timestamp Timestamp of packet.
offset Offset to copy from.
max Maximum data size.
- Returns
- Number of packet data bytes set.
void SyncSourceHandler::setParticipant
(
SyncSource &
source,
)
inlineinherited |
Set the payload format in use, for timing and payload type identification purposes.
- Parameters
-
pf payload format to use from now on.
- Returns
- whether the payload format has been successfully set.
Definition at line 180 of file queuebase.h.
void UDPSocket::setPeer
(
const
IPV4Host &
host,
)
inherited |
set the peer address to send message packets to.
This can be set before every send() call if nessisary.
- Parameters
-
host address to send packets to.
port number to deliver packets to.
void UDPSocket::setPeer
(
const
IPV4Host &
host,
)
inherited |
set the peer address to send message packets to.
This can be set before every send() call if nessisary.
- Parameters
-
host address to send packets to.
port number to deliver packets to.
void UDPSocket::setPeer
(
const char *
service )
inherited |
Associate socket with a named connection.
void UDPSocket::setPeer
(
const char *
service )
inherited |
Associate socket with a named connection.
void ParticipantHandler::setPRIVPrefix
(
Participant *
part,
const std::string
val
)
inlineinherited |
Error UDPTransmit::setRouting
(
bool
enable )
inlineinherited |
Error UDPReceive::setRouting
(
bool
enable )
inlineprotectedinherited |
Set the default scheduling timeout to use when no data packets are waiting to be sent.
- Parameters
-
to timeout in milliseconds.
Definition at line 367 of file oqueue.h.
void ParticipantHandler::setSDESItem
(
Participant *
part,
const std::string &
val
)
inlineinherited |
void SyncSourceHandler::setSender
(
SyncSource &
source,
bool
active
)
inlineinherited |
void RTPDataQueue::setSessionBandwidth
(
uint32
bw )
inlineinherited |
void IncomingDataQueue::setSourceExpirationPeriod
(
uint8
intervals )
inlineprotectedinherited |
Set the number of RTCP intervals that the stack will wait to change the state of a source from stateActive to stateInactive, or to delete the source after being in stateInactive.
Note that this value should be uniform accross all participants and SHOULD be fixed for a particular profile.
- Parameters
-
intervals number of RTCP report intervals
- Note
- If RTCP is not being used, the RTCP interval is assumed to be the default: 5 seconds.
-
The default for this value is, as RECOMMENDED, 5.
Definition at line 1122 of file iqueue.h.
void SyncSourceHandler::setState
(
SyncSource &
source,
)
|