#include <rtp.h>
Inheritance diagram for RTP_UDP:

Public Member Functions | |
| void | Reopen (BOOL isReading) |
| int | GetDataSocketHandle () const |
| int | GetControlSocketHandle () const |
Construction | |
| RTP_UDP (unsigned id, BOOL remoteIsNat=FALSE) | |
| ~RTP_UDP () | |
| Destroy the RTP. | |
Overrides from class RTP_Session | |
| virtual BOOL | ReadData (RTP_DataFrame &frame, BOOL loop) |
| virtual BOOL | WriteData (RTP_DataFrame &frame) |
| virtual BOOL | WriteControl (RTP_ControlFrame &frame) |
| virtual void | Close (BOOL reading) |
| virtual PString | GetLocalHostName () |
QoS Settings | |
| virtual BOOL | ModifyQOS (RTP_QOS *rtpqos) |
| virtual void | EnableGQoS (BOOL success=TRUE) |
New functions for class | |
| BOOL | Open (PIPSocket::Address localAddress, WORD portBase, WORD portMax, BYTE ipTypeOfService, void *=NULL, RTP_QOS *rtpqos=NULL) |
Member variable access | |
| PIPSocket::Address | GetLocalAddress () const |
| void | SetLocalAddress (const PIPSocket::Address &addr) |
| PIPSocket::Address | GetRemoteAddress () const |
| WORD | GetLocalDataPort () const |
| WORD | GetLocalControlPort () const |
| WORD | GetRemoteDataPort () const |
| WORD | GetRemoteControlPort () const |
| PUDPSocket & | GetDataSocket () |
| PUDPSocket & | GetControlSocket () |
| BOOL | SetRemoteSocketInfo (PIPSocket::Address address, WORD port, BOOL isDataPort) |
| void | ApplyQOS (const PIPSocket::Address &addr) |
Protected Member Functions | |
| SendReceiveStatus | ReadDataPDU (RTP_DataFrame &frame) |
| SendReceiveStatus | ReadControlPDU () |
| SendReceiveStatus | ReadDataOrControlPDU (PUDPSocket &socket, PBYTEArray &frame, BOOL fromDataChannel) |
Protected Attributes | |
| PIPSocket::Address | localAddress |
| WORD | localDataPort |
| WORD | localControlPort |
| PIPSocket::Address | remoteAddress |
| WORD | remoteDataPort |
| WORD | remoteControlPort |
| PIPSocket::Address | remoteTransmitAddress |
| BOOL | shutdownRead |
| BOOL | shutdownWrite |
| PUDPSocket * | dataSocket |
| PUDPSocket * | controlSocket |
| BOOL | appliedQOS |
| BOOL | enableGQOS |
| BOOL | remoteIsNAT |
Definition at line 1072 of file rtp.h.
| RTP_UDP::RTP_UDP | ( | unsigned | id, | |
| BOOL | remoteIsNat = FALSE | |||
| ) |
Create a new RTP channel.
| id | Session ID for RTP channel |
| remoteIsNat | If TRUE, we have hints the remote endpoint is behind a NAT |
Definition at line 1583 of file rtp.cxx.
References appliedQOS, controlSocket, dataSocket, enableGQOS, remoteControlPort, remoteDataPort, shutdownRead, and shutdownWrite.
| BOOL RTP_UDP::ReadData | ( | RTP_DataFrame & | frame, | |
| BOOL | loop | |||
| ) | [virtual] |
Read a data frame from the RTP channel. Any control frames received are dispatched to callbacks and are not returned by this function. It will block until a data frame is available or an error occurs.
Implements RTP_Session.
Definition at line 1820 of file rtp.cxx.
References controlSocket, dataSocket, RTP_Session::e_AbortTransport, RTP_Session::e_IgnorePacket, RTP_Session::e_ProcessPacket, ReadControlPDU(), ReadDataPDU(), RTP_Session::reportTimer, RTP_Session::SendReport(), RTP_Session::sessionID, and shutdownRead.
| BOOL RTP_UDP::WriteData | ( | RTP_DataFrame & | frame | ) | [virtual] |
Write a data frame from the RTP channel.
Implements RTP_Session.
Definition at line 1988 of file rtp.cxx.
References dataSocket, RTP_Session::e_AbortTransport, RTP_Session::e_IgnorePacket, RTP_Session::e_ProcessPacket, RTP_Session::OnSendData(), remoteAddress, remoteDataPort, RTP_Session::sessionID, and shutdownWrite.
| BOOL RTP_UDP::WriteControl | ( | RTP_ControlFrame & | frame | ) | [virtual] |
Write a control frame from the RTP channel.
Implements RTP_Session.
Definition at line 2031 of file rtp.cxx.
References controlSocket, RTP_ControlFrame::GetCompoundSize(), remoteAddress, remoteControlPort, and RTP_Session::sessionID.
| void RTP_UDP::Close | ( | BOOL | reading | ) | [virtual] |
Close down the RTP session.
| reading | Closing the read side of the session |
Implements RTP_Session.
Definition at line 1755 of file rtp.cxx.
References controlSocket, dataSocket, RTP_Session::sessionID, shutdownRead, shutdownWrite, and RTP_Session::syncSourceIn.
Referenced by ~RTP_UDP().
| PString RTP_UDP::GetLocalHostName | ( | ) | [virtual] |
Get the session description name.
Implements RTP_Session.
Definition at line 1778 of file rtp.cxx.
Referenced by Open().
| BOOL RTP_UDP::ModifyQOS | ( | RTP_QOS * | rtpqos | ) | [virtual] |
Change the QoS settings
Reimplemented from RTP_Session.
Definition at line 1629 of file rtp.cxx.
References appliedQOS, controlSocket, and dataSocket.
| void RTP_UDP::EnableGQoS | ( | BOOL | success = TRUE |
) | [virtual] |
| BOOL RTP_UDP::Open | ( | PIPSocket::Address | localAddress, | |
| WORD | portBase, | |||
| WORD | portMax, | |||
| BYTE | ipTypeOfService, | |||
| void * | = NULL, |
|||
| RTP_QOS * | rtpqos = NULL | |||
| ) |
Open the UDP ports for the RTP session.
| localAddress | Local interface to bind to |
| portBase | Base of ports to search |
| portMax | end of ports to search (inclusive) |
| ipTypeOfService | Type of Service byte |
| rtpqos | QOS spec (or NULL if no QoS) |
Definition at line 1664 of file rtp.cxx.
References RTP_Session::canonicalName, controlSocket, dataSocket, GetLocalHostName(), localAddress, localControlPort, localDataPort, RTP_Session::sessionID, shutdownRead, shutdownWrite, and RTP_Session::syncSourceOut.
Referenced by H323_RTP_UDP::H323_RTP_UDP().
| void RTP_UDP::Reopen | ( | BOOL | isReading | ) |
Reopens an existing session in the given direction.
Definition at line 1746 of file rtp.cxx.
References shutdownRead, and shutdownWrite.
| PIPSocket::Address RTP_UDP::GetLocalAddress | ( | ) | const [inline] |
Get local address of session.
Definition at line 1165 of file rtp.h.
Referenced by H323_RTP_UDP::H323_RTP_UDP(), RTP_Session::OnReceiveData(), H323_RTP_UDP::OnSendingAckPDU(), and H323_RTP_UDP::OnSendingPDU().
| void RTP_UDP::SetLocalAddress | ( | const PIPSocket::Address & | addr | ) | [inline] |
Set local address of session.
Definition at line 1169 of file rtp.h.
Referenced by H323_RTP_UDP::H323_RTP_UDP().
| PIPSocket::Address RTP_UDP::GetRemoteAddress | ( | ) | const [inline] |
Get remote address of session.
Definition at line 1175 of file rtp.h.
References remoteAddress.
Referenced by RTP_Session::OnReceiveData(), and H323_RTP_UDP::OnSendRasInfo().
| WORD RTP_UDP::GetLocalDataPort | ( | ) | const [inline] |
Get local data port of session.
Definition at line 1179 of file rtp.h.
References localDataPort.
Referenced by RTP_Session::OnReceiveData(), H323_RTP_UDP::OnSendingAckPDU(), H323_RTP_UDP::OnSendingPDU(), and H323_RTP_UDP::OnSendRasInfo().
| WORD RTP_UDP::GetLocalControlPort | ( | ) | const [inline] |
Get local control port of session.
Definition at line 1183 of file rtp.h.
References localControlPort.
Referenced by H323_RTP_UDP::OnSendingAckPDU(), H323_RTP_UDP::OnSendingPDU(), and H323_RTP_UDP::OnSendRasInfo().
| WORD RTP_UDP::GetRemoteDataPort | ( | ) | const [inline] |
Get remote data port of session.
Definition at line 1187 of file rtp.h.
References remoteDataPort.
Referenced by ApplyQOS(), RTP_Session::OnReceiveData(), and H323_RTP_UDP::OnSendRasInfo().
| WORD RTP_UDP::GetRemoteControlPort | ( | ) | const [inline] |
Get remote control port of session.
Definition at line 1191 of file rtp.h.
References remoteControlPort.
Referenced by ApplyQOS().
| PUDPSocket& RTP_UDP::GetDataSocket | ( | ) | [inline] |
| PUDPSocket& RTP_UDP::GetControlSocket | ( | ) | [inline] |
| BOOL RTP_UDP::SetRemoteSocketInfo | ( | PIPSocket::Address | address, | |
| WORD | port, | |||
| BOOL | isDataPort | |||
| ) |
Set the remote address and port information for session.
| address | Address of remote |
| port | Port on remote |
| isDataPort | Flag for data or control channel |
Definition at line 1784 of file rtp.cxx.
References appliedQOS, ApplyQOS(), localAddress, localControlPort, localDataPort, remoteAddress, remoteControlPort, remoteDataPort, remoteIsNAT, and RTP_Session::sessionID.
Referenced by H323_RTP_UDP::ExtractTransport().
| void RTP_UDP::ApplyQOS | ( | const PIPSocket::Address & | addr | ) |
Apply QOS - requires address to connect the socket on Windows platforms
Definition at line 1618 of file rtp.cxx.
References appliedQOS, controlSocket, dataSocket, GetRemoteControlPort(), and GetRemoteDataPort().
Referenced by ReadDataOrControlPDU(), and SetRemoteSocketInfo().
1.5.2