Yate
UDPTLSession Class Referenceabstract

UDPTL session. More...

#include <yatertp.h>

Inheritance diagram for UDPTLSession:
UDPSession Mutex RTPProcessor Lockable GenObject RTPDebug

Public Member Functions

 ~UDPTLSession ()
 
bool localAddr (SocketAddr &addr)
 
u_int16_t maxLen () const
 
u_int8_t maxSec () const
 
virtual void rtpData (const void *data, int len)
 
bool udptlSend (const void *data, int len, u_int16_t seq)
 
- Public Member Functions inherited from UDPSession
virtual ~UDPSession ()
 
bool initTransport ()
 
bool initGroup (int msec=0, Thread::Priority prio=Thread::Normal, const String &affinity=String::empty())
 
bool remoteAddr (SocketAddr &addr, bool sniff=false)
 
bool setBuffer (int bufLen=4096)
 
bool setTOS (int tos)
 
SocketrtpSock ()
 
bool drillHole ()
 
void setTimeout (int interval)
 
RTPTransporttransport () const
 
virtual void transport (RTPTransport *trans)
 
- Public Member Functions inherited from RTPProcessor
 RTPProcessor (DebugEnabler *dbg=0, const char *traceId=0)
 
virtual ~RTPProcessor ()
 
RTPGroupgroup () const
 
virtual void rtcpData (const void *data, int len)
 
virtual void getStats (String &stats) const
 
virtual void incWrongSrc ()
 
unsigned int wrongSrc ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from RTPDebug
 RTPDebug (DebugEnabler *dbg, const char *traceId)
 
 RTPDebug (RTPSession *session)
 
DebugEnablerdbg () const
 
const StringdbgTraceId () const
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Protected Member Functions

 UDPTLSession (u_int16_t maxLen=250, u_int8_t maxSec=2, DebugEnabler *dbg=0, const char *traceId=0)
 
virtual void timerTick (const Time &when)
 
virtual RTPTransportcreateTransport ()
 
virtual void udptlRecv (const void *data, int len, u_int16_t seq, bool recovered)=0
 
- Protected Member Functions inherited from UDPSession
 UDPSession (DebugEnabler *dbg=0, const char *traceId=0)
 
virtual void timeout (bool initial)
 
- Protected Member Functions inherited from RTPProcessor
void group (RTPGroup *newgrp)
 
- Protected Member Functions inherited from RTPDebug
void setDebug (DebugEnabler *dbg, const char *traceId)
 

Additional Inherited Members

- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Protected Attributes inherited from UDPSession
RTPTransportm_transport
 
u_int64_t m_timeoutTime
 
u_int64_t m_timeoutInterval
 
- Protected Attributes inherited from RTPProcessor
unsigned int m_wrongSrc
 
- Protected Attributes inherited from RTPDebug
DebugEnablerm_dbg
 
String m_traceId
 

Detailed Description

UDPTL session.

A bidirectional UDPTL session usable for T.38

Constructor & Destructor Documentation

◆ ~UDPTLSession()

Destructor

◆ UDPTLSession()

UDPTLSession ( u_int16_t maxLen = 250,
u_int8_t maxSec = 2,
DebugEnabler * dbg = 0,
const char * traceId = 0 )
protected

UDPTL Session constructor

Parameters
maxLenMaximum length of UDPTL packet, at least longest primary IFP + 5 bytes
maxSecMaximum number of secondary IFPs, set to zero to disable
dbgSession DebugEnabler
traceIdSession trace ID

References RTPDebug::dbg(), maxLen(), maxSec(), and GenObject::traceId().

Member Function Documentation

◆ createTransport()

virtual RTPTransport * createTransport ( )
protectedvirtual

Create a new UDPTL transport for this session. Override this method to create objects derived from RTPTransport.

Returns
Pointer to the new transport or NULL on failure

Reimplemented from UDPSession.

◆ localAddr()

bool localAddr ( SocketAddr & addr)
inline

Set the local network address of the RTP transport of this session

Parameters
addrNew local RTP transport address
Returns
True if address set, false if a failure occured

◆ maxLen()

u_int16_t maxLen ( ) const
inline

Get the maximum UDPTL packet length

Returns
Maximum length of UDPTL packet length in bytes

Referenced by UDPTLSession().

◆ maxSec()

u_int8_t maxSec ( ) const
inline

Get the maximum number of UDPTL secondary IFPs

Returns
Maximum number of secondary IFPs, zero if disabled

Referenced by UDPTLSession().

◆ rtpData()

virtual void rtpData ( const void * data,
int len )
virtual

This method is called to send or process an UDPTL packet

Parameters
dataPointer to raw UDPTL data
lenLength of the data packet

Reimplemented from RTPProcessor.

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Method called periodically to push any asynchronous data or statistics

Parameters
whenTime to use as base in all computing

Implements RTPProcessor.

◆ udptlRecv()

virtual void udptlRecv ( const void * data,
int len,
u_int16_t seq,
bool recovered )
protectedpure virtual

Method called when UDPTL data is received

Parameters
dataPointer to IFP block
lenLength of the IFP block
seqSequence number of the block
recoveredTrue if the IFP block was recovered after data loss

◆ udptlSend()

bool udptlSend ( const void * data,
int len,
u_int16_t seq )

Send UDPTL data over the transport, add older blocks for error recovery

Parameters
dataPointer to IFP block to send as primary
lenLength of primary IFP block
seqSequence number to incorporate in message
Returns
True if data block was sent, false if an error occured

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