reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
flowmanager::FlowManager Class Reference

This class represents the Flow Manager. More...

#include <FlowManager.hxx>

Public Member Functions

 FlowManager ()
 
virtual ~FlowManager ()
 
MediaStream * createMediaStream (MediaStreamHandler &mediaStreamHandler, const StunTuple &localBinding, bool rtcpEnabled=true, MediaStream::NatTraversalMode natTraversalMode=MediaStream::NoNatTraversal, const char *natTraversalServerHostname=0, unsigned short natTraversalServerPort=0, const char *stunUsername=0, const char *stunPassword=0, bool forceCOMedia=false, std::shared_ptr< FlowContext > context=nullptr)
 
void initializeDtlsFactory (const char *certAor)
 
dtls::DtlsFactory * getDtlsFactory ()
 
bool addTlsRootCertificates (const resip::Data &rootCertificatesFile)
 Adds the root (CA) certificates in a PEM file to those TURN servers' TLS certificates are verified with.
 
void setValidateTlsServerHostname (bool validate)
 Whether flows using TURN over TLS check that the server's certificate is for the TURN server's host name (or IP address) - default true.
 
void setRTCPEventLoggingHandler (std::shared_ptr< RTCPEventLoggingHandler > handler) noexcept
 
RTCPEventLoggingHandler * getRTCPEventLoggingHandler () const noexcept
 

Static Public Member Functions

static int createCert (const resip::Data &pAor, int expireDays, int keyLen, X509 *&outCert, EVP_PKEY *&outKey)
 

Detailed Description

This class represents the Flow Manager.

It is responsible for sending/receiving media and performing the necessary NAT traversal.

Threading Notes: This class implements a thread to manage the asyncrouns reTurn client library calls. Essentially all asyncrounous operations for all Flows will be called from this one thread.

Author: Scott Godin (sgodin AT SipSpectrum DOT com)

Definition at line 42 of file FlowManager.hxx.

Constructor & Destructor Documentation

◆ FlowManager()

FlowManager::FlowManager ( )

Definition at line 63 of file FlowManager.cxx.

◆ ~FlowManager()

FlowManager::~FlowManager ( )
virtual

Definition at line 104 of file FlowManager.cxx.

Member Function Documentation

◆ addTlsRootCertificates()

bool FlowManager::addTlsRootCertificates ( const resip::Data &  rootCertificatesFile)

Adds the root (CA) certificates in a PEM file to those TURN servers' TLS certificates are verified with.

"ca.pem" in the working directory is loaded at construction, if it exists. Returns false if the file can't be loaded.

Definition at line 231 of file FlowManager.cxx.

◆ createCert()

int FlowManager::createCert ( const resip::Data &  pAor,
int  expireDays,
int  keyLen,
X509 *&  outCert,
EVP_PKEY *&  outKey 
)
static

Definition at line 244 of file FlowManager.cxx.

◆ createMediaStream()

MediaStream * FlowManager::createMediaStream ( MediaStreamHandler &  mediaStreamHandler,
const StunTuple &  localBinding,
bool  rtcpEnabled = true,
MediaStream::NatTraversalMode  natTraversalMode = MediaStream::NoNatTraversal,
const char *  natTraversalServerHostname = 0,
unsigned short  natTraversalServerPort = 0,
const char *  stunUsername = 0,
const char *  stunPassword = 0,
bool  forceCOMedia = false,
std::shared_ptr< FlowContext >  context = nullptr 
)

Definition at line 168 of file FlowManager.cxx.

◆ getDtlsFactory()

dtls::DtlsFactory * flowmanager::FlowManager::getDtlsFactory ( )
inline

Definition at line 67 of file FlowManager.hxx.

◆ getRTCPEventLoggingHandler()

RTCPEventLoggingHandler * flowmanager::FlowManager::getRTCPEventLoggingHandler ( ) const
inlinenoexcept

Definition at line 82 of file FlowManager.hxx.

◆ initializeDtlsFactory()

void FlowManager::initializeDtlsFactory ( const char *  certAor)

Definition at line 124 of file FlowManager.cxx.

◆ setRTCPEventLoggingHandler()

void flowmanager::FlowManager::setRTCPEventLoggingHandler ( std::shared_ptr< RTCPEventLoggingHandler >  handler)
inlinenoexcept

Definition at line 81 of file FlowManager.hxx.

◆ setValidateTlsServerHostname()

void flowmanager::FlowManager::setValidateTlsServerHostname ( bool  validate)
inline

Whether flows using TURN over TLS check that the server's certificate is for the TURN server's host name (or IP address) - default true.

Applies to media streams created after the call.

Definition at line 79 of file FlowManager.hxx.


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