RTP_UDP Class Reference

#include <rtp.h>

Inheritance diagram for RTP_UDP:

RTP_Session

List of all members.

Public Member Functions

virtual BOOL ModifyQOS (RTP_QOS *rtpqos)
virtual void Reopen (BOOL isReading)
Construction
 RTP_UDP (unsigned id)
 ~RTP_UDP ()
 Destroy the RTP.
Overrides from class RTP_Session
virtual BOOL ReadData (RTP_DataFrame &frame)
virtual BOOL WriteData (RTP_DataFrame &frame)
virtual BOOL WriteControl (RTP_ControlFrame &frame)
virtual void Close (BOOL reading)
virtual PString GetLocalHostName ()
New functions for class
BOOL Open (PIPSocket::Address localAddress, WORD portBase, WORD portMax, BYTE ipTypeOfService, PSTUNClient *stun=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


Detailed Description

This class is for the IETF Real Time Protocol interface on UDP/IP.

Constructor & Destructor Documentation

RTP_UDP::RTP_UDP ( unsigned  id  ) 

Create a new RTP channel.

Parameters:
id  Session ID for RTP channel

RTP_UDP::~RTP_UDP (  ) 

Destroy the RTP.


Member Function Documentation

virtual BOOL RTP_UDP::ReadData ( RTP_DataFrame frame  )  [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.

virtual BOOL RTP_UDP::WriteData ( RTP_DataFrame frame  )  [virtual]

Write a data frame from the RTP channel.

Implements RTP_Session.

virtual BOOL RTP_UDP::WriteControl ( RTP_ControlFrame frame  )  [virtual]

Write a control frame from the RTP channel.

Implements RTP_Session.

virtual void RTP_UDP::Close ( BOOL  reading  )  [virtual]

Close down the RTP session.

Parameters:
reading  Closing the read side of the session

Implements RTP_Session.

virtual PString RTP_UDP::GetLocalHostName (  )  [virtual]

Get the session description name.

Implements RTP_Session.

virtual BOOL RTP_UDP::ModifyQOS ( RTP_QOS rtpqos  )  [virtual]

Change the QoS settings

Reimplemented from RTP_Session.

BOOL RTP_UDP::Open ( PIPSocket::Address  localAddress,
WORD  portBase,
WORD  portMax,
BYTE  ipTypeOfService,
PSTUNClient *  stun = NULL,
RTP_QOS rtpqos = NULL 
)

Open the UDP ports for the RTP session.

Parameters:
localAddress  Local interface to bind to
portBase  Base of ports to search
portMax  end of ports to search (inclusive)
ipTypeOfService  Type of Service byte
stun  STUN server to use createing sockets (or NULL if no STUN)
rtpqos  QOS spec (or NULL if no QoS)

virtual void RTP_UDP::Reopen ( BOOL  isReading  )  [virtual]

Reopens an existing session in the given direction.

Implements RTP_Session.

PIPSocket::Address RTP_UDP::GetLocalAddress (  )  const [inline]

Get local address of session.

void RTP_UDP::SetLocalAddress ( const PIPSocket::Address &  addr  )  [inline]

Set local address of session.

PIPSocket::Address RTP_UDP::GetRemoteAddress (  )  const [inline]

Get remote address of session.

WORD RTP_UDP::GetLocalDataPort (  )  const [inline]

Get local data port of session.

WORD RTP_UDP::GetLocalControlPort (  )  const [inline]

Get local control port of session.

WORD RTP_UDP::GetRemoteDataPort (  )  const [inline]

Get remote data port of session.

WORD RTP_UDP::GetRemoteControlPort (  )  const [inline]

Get remote control port of session.

PUDPSocket& RTP_UDP::GetDataSocket (  )  [inline]

Get data UDP socket of session.

PUDPSocket& RTP_UDP::GetControlSocket (  )  [inline]

Get control UDP socket of session.

BOOL RTP_UDP::SetRemoteSocketInfo ( PIPSocket::Address  address,
WORD  port,
BOOL  isDataPort 
)

Set the remote address and port information for session.

Parameters:
address  Address of remote
port  Port on remote
isDataPort  Flag for data or control channel

void RTP_UDP::ApplyQOS ( const PIPSocket::Address &  addr  ) 

Apply QOS - requires address to connect the socket on Windows platforms

SendReceiveStatus RTP_UDP::ReadDataPDU ( RTP_DataFrame frame  )  [protected]

SendReceiveStatus RTP_UDP::ReadControlPDU (  )  [protected]

SendReceiveStatus RTP_UDP::ReadDataOrControlPDU ( PUDPSocket &  socket,
PBYTEArray &  frame,
BOOL  fromDataChannel 
) [protected]


Member Data Documentation

PIPSocket::Address RTP_UDP::localAddress [protected]

WORD RTP_UDP::localDataPort [protected]

WORD RTP_UDP::localControlPort [protected]

PIPSocket::Address RTP_UDP::remoteAddress [protected]

WORD RTP_UDP::remoteDataPort [protected]

WORD RTP_UDP::remoteControlPort [protected]

PIPSocket::Address RTP_UDP::remoteTransmitAddress [protected]

BOOL RTP_UDP::shutdownRead [protected]

BOOL RTP_UDP::shutdownWrite [protected]

PUDPSocket* RTP_UDP::dataSocket [protected]

PUDPSocket* RTP_UDP::controlSocket [protected]

BOOL RTP_UDP::appliedQOS [protected]


The documentation for this class was generated from the following file:

Generated on Wed Dec 17 08:09:06 2008 for OPAL by  doxygen 1.5.6