reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
reTurn::TurnAsyncSocket Class Referenceabstract

#include <TurnAsyncSocket.hxx>

Inheritance diagram for reTurn::TurnAsyncSocket:
[legend]

Public Member Functions

 TurnAsyncSocket (asio::io_context &ioService, AsyncSocketBase &asyncSocketBase, TurnAsyncSocketHandler *turnAsyncSocketHandler, const asio::ip::address &address=UnspecifiedIpAddress, unsigned short port=0)
 
virtual ~TurnAsyncSocket ()
 
virtual void disableTurnAsyncHandler ()
 
virtual unsigned int getSocketDescriptor ()=0
 
const asio::error_code & getBindError () const
 The outcome of binding the socket to the local address and port it was created with: eg.
 
void requestSharedSecret ()
 
void setUsernameAndPassword (const char *username, const char *password, bool shortTermAuth=false)
 
void setLocalPassword (const char *password)
 
void setSoftware (const char *software)
 
void connect (const std::string &address, unsigned short port)
 
void bindRequest ()
 
void connectivityCheck (const StunTuple &targetAddr, uint32_t peerRflxPriority, bool setIceControlling, bool setIceControlled, unsigned int numRetransmits, unsigned int retrans_iterval_ms)
 
void createAllocation (unsigned int lifetimeSecs=UnspecifiedLifetime, unsigned int bandwidth=UnspecifiedBandwidth, unsigned char requestedPortProps=StunMessage::PropsNone, uint64_t reservationToken=UnspecifiedToken, StunTuple::TransportType requestedTransportType=StunTuple::None)
 
void refreshAllocation (unsigned int lifetimeSecs)
 
void destroyAllocation ()
 
void setActiveDestination (const asio::ip::address &address, unsigned short port)
 
void clearActiveDestination ()
 
asio::ip::address & getConnectedAddress () noexcept
 
unsigned short getConnectedPort () const noexcept
 
virtual void send (const char *buffer, size_t size)
 
virtual void sendTo (const asio::ip::address &address, unsigned short port, const char *buffer, size_t size)
 
virtual void sendUnframed (const std::shared_ptr< DataBuffer > &data)
 
virtual void sendFramed (const std::shared_ptr< DataBuffer > &data)
 
virtual void sendToUnframed (const asio::ip::address &address, unsigned short port, const std::shared_ptr< DataBuffer > &data)
 
virtual void sendToFramed (const asio::ip::address &address, unsigned short port, const std::shared_ptr< DataBuffer > &data)
 
virtual void close ()
 
virtual void turnReceive ()
 
virtual void setOnBeforeSocketClosedFp (AsyncSocketBase::BeforeClosedHandler fp)
 

Static Public Attributes

static unsigned int UnspecifiedLifetime = 0xFFFFFFFF
 
static unsigned int UnspecifiedBandwidth = 0xFFFFFFFF
 
static unsigned short UnspecifiedToken = 0
 
static asio::ip::address UnspecifiedIpAddress
 

Protected Member Functions

void handleReceivedData (const asio::ip::address &address, unsigned short port, const std::shared_ptr< DataBuffer > &data)
 
void handleChannelData (const std::shared_ptr< DataBuffer > &data)
 

Protected Attributes

asio::error_code mBindError
 
asio::io_context & mIOService
 
TurnAsyncSocketHandler * mTurnAsyncSocketHandler
 
resip::RecursiveMutex mHandlerMutex
 
StunTuple mLocalBinding
 
resip::Data mUsername
 
resip::Data mPassword
 
resip::Data mHmacKey
 
resip::Data mRealm
 
resip::Data mNonce
 
resip::Data mSoftware
 
resip::Data mLocalHmacKey
 
StunTuple::TransportType mRequestedTransportType
 
bool mHaveAllocation
 
StunTuple::TransportType mRelayTransportType
 
unsigned int mLifetime
 
ChannelManager mChannelManager
 
RemotePeer * mActiveDestination
 

Friends

class RequestEntry
 

Detailed Description

Definition at line 41 of file TurnAsyncSocket.hxx.

Constructor & Destructor Documentation

◆ TurnAsyncSocket()

reTurn::TurnAsyncSocket::TurnAsyncSocket ( asio::io_context &  ioService,
AsyncSocketBase &  asyncSocketBase,
TurnAsyncSocketHandler *  turnAsyncSocketHandler,
const asio::ip::address &  address = UnspecifiedIpAddress,
unsigned short  port = 0 
)
explicit

Definition at line 36 of file TurnAsyncSocket.cxx.

◆ ~TurnAsyncSocket()

reTurn::TurnAsyncSocket::~TurnAsyncSocket ( )
virtual

Definition at line 53 of file TurnAsyncSocket.cxx.

Member Function Documentation

◆ bindRequest()

void reTurn::TurnAsyncSocket::bindRequest ( )

Definition at line 137 of file TurnAsyncSocket.cxx.

◆ clearActiveDestination()

void reTurn::TurnAsyncSocket::clearActiveDestination ( )

Definition at line 385 of file TurnAsyncSocket.cxx.

◆ close()

void reTurn::TurnAsyncSocket::close ( )
virtual

Definition at line 1216 of file TurnAsyncSocket.cxx.

◆ connect()

void reTurn::TurnAsyncSocket::connect ( const std::string &  address,
unsigned short  port 
)

Definition at line 1210 of file TurnAsyncSocket.cxx.

◆ connectivityCheck()

void reTurn::TurnAsyncSocket::connectivityCheck ( const StunTuple &  targetAddr,
uint32_t  peerRflxPriority,
bool  setIceControlling,
bool  setIceControlled,
unsigned int  numRetransmits,
unsigned int  retrans_iterval_ms 
)

Definition at line 160 of file TurnAsyncSocket.cxx.

◆ createAllocation()

void reTurn::TurnAsyncSocket::createAllocation ( unsigned int  lifetimeSecs = UnspecifiedLifetime,
unsigned int  bandwidth = UnspecifiedBandwidth,
unsigned char  requestedPortProps = StunMessage::PropsNone,
uint64_t  reservationToken = UnspecifiedToken,
StunTuple::TransportType  requestedTransportType = StunTuple::None 
)

Definition at line 188 of file TurnAsyncSocket.cxx.

◆ destroyAllocation()

void reTurn::TurnAsyncSocket::destroyAllocation ( )

Definition at line 321 of file TurnAsyncSocket.cxx.

◆ disableTurnAsyncHandler()

void reTurn::TurnAsyncSocket::disableTurnAsyncHandler ( )
virtual

Definition at line 71 of file TurnAsyncSocket.cxx.

◆ getBindError()

const asio::error_code & reTurn::TurnAsyncSocket::getBindError ( ) const
inline

The outcome of binding the socket to the local address and port it was created with: eg.

address_in_use if another socket has the port

Definition at line 61 of file TurnAsyncSocket.hxx.

◆ getConnectedAddress()

asio::ip::address & reTurn::TurnAsyncSocket::getConnectedAddress ( )
inlinenoexcept

Definition at line 97 of file TurnAsyncSocket.hxx.

◆ getConnectedPort()

unsigned short reTurn::TurnAsyncSocket::getConnectedPort ( ) const
inlinenoexcept

Definition at line 98 of file TurnAsyncSocket.hxx.

◆ getSocketDescriptor()

virtual unsigned int reTurn::TurnAsyncSocket::getSocketDescriptor ( )
pure virtual

◆ handleChannelData()

void reTurn::TurnAsyncSocket::handleChannelData ( const std::shared_ptr< DataBuffer > &  data)
protected

Definition at line 511 of file TurnAsyncSocket.cxx.

◆ handleReceivedData()

void reTurn::TurnAsyncSocket::handleReceivedData ( const asio::ip::address &  address,
unsigned short  port,
const std::shared_ptr< DataBuffer > &  data 
)
protected

Definition at line 470 of file TurnAsyncSocket.cxx.

◆ refreshAllocation()

void reTurn::TurnAsyncSocket::refreshAllocation ( unsigned int  lifetimeSecs)

Definition at line 283 of file TurnAsyncSocket.cxx.

◆ requestSharedSecret()

void reTurn::TurnAsyncSocket::requestSharedSecret ( )

Definition at line 78 of file TurnAsyncSocket.cxx.

◆ send()

void reTurn::TurnAsyncSocket::send ( const char *  buffer,
size_t  size 
)
virtual

Definition at line 1080 of file TurnAsyncSocket.cxx.

◆ sendFramed()

void reTurn::TurnAsyncSocket::sendFramed ( const std::shared_ptr< DataBuffer > &  data)
virtual

Definition at line 1092 of file TurnAsyncSocket.cxx.

◆ sendTo()

void reTurn::TurnAsyncSocket::sendTo ( const asio::ip::address &  address,
unsigned short  port,
const char *  buffer,
size_t  size 
)
virtual

Definition at line 1086 of file TurnAsyncSocket.cxx.

◆ sendToFramed()

void reTurn::TurnAsyncSocket::sendToFramed ( const asio::ip::address &  address,
unsigned short  port,
const std::shared_ptr< DataBuffer > &  data 
)
virtual

Definition at line 1098 of file TurnAsyncSocket.cxx.

◆ sendToUnframed()

void reTurn::TurnAsyncSocket::sendToUnframed ( const asio::ip::address &  address,
unsigned short  port,
const std::shared_ptr< DataBuffer > &  data 
)
virtual

Definition at line 1111 of file TurnAsyncSocket.cxx.

◆ sendUnframed()

void reTurn::TurnAsyncSocket::sendUnframed ( const std::shared_ptr< DataBuffer > &  data)
virtual

Definition at line 1104 of file TurnAsyncSocket.cxx.

◆ setActiveDestination()

void reTurn::TurnAsyncSocket::setActiveDestination ( const asio::ip::address &  address,
unsigned short  port 
)

Definition at line 333 of file TurnAsyncSocket.cxx.

◆ setLocalPassword()

void reTurn::TurnAsyncSocket::setLocalPassword ( const char *  password)

Definition at line 124 of file TurnAsyncSocket.cxx.

◆ setOnBeforeSocketClosedFp()

void reTurn::TurnAsyncSocket::setOnBeforeSocketClosedFp ( AsyncSocketBase::BeforeClosedHandler  fp)
virtual

Definition at line 1487 of file TurnAsyncSocket.cxx.

◆ setSoftware()

void reTurn::TurnAsyncSocket::setSoftware ( const char *  software)

Definition at line 1186 of file TurnAsyncSocket.cxx.

◆ setUsernameAndPassword()

void reTurn::TurnAsyncSocket::setUsernameAndPassword ( const char *  username,
const char *  password,
bool  shortTermAuth = false 
)

Definition at line 105 of file TurnAsyncSocket.cxx.

◆ turnReceive()

void reTurn::TurnAsyncSocket::turnReceive ( )
virtual

Definition at line 1247 of file TurnAsyncSocket.cxx.

Friends And Related Symbol Documentation

◆ RequestEntry

friend class RequestEntry
friend

Definition at line 182 of file TurnAsyncSocket.hxx.

Member Data Documentation

◆ mActiveDestination

RemotePeer* reTurn::TurnAsyncSocket::mActiveDestination
protected

Definition at line 153 of file TurnAsyncSocket.hxx.

◆ mBindError

asio::error_code reTurn::TurnAsyncSocket::mBindError
protected

Definition at line 119 of file TurnAsyncSocket.hxx.

◆ mChannelManager

ChannelManager reTurn::TurnAsyncSocket::mChannelManager
protected

Definition at line 152 of file TurnAsyncSocket.hxx.

◆ mHandlerMutex

resip::RecursiveMutex reTurn::TurnAsyncSocket::mHandlerMutex
protected

Definition at line 126 of file TurnAsyncSocket.hxx.

◆ mHaveAllocation

bool reTurn::TurnAsyncSocket::mHaveAllocation
protected

Definition at line 148 of file TurnAsyncSocket.hxx.

◆ mHmacKey

resip::Data reTurn::TurnAsyncSocket::mHmacKey
protected

Definition at line 134 of file TurnAsyncSocket.hxx.

◆ mIOService

asio::io_context& reTurn::TurnAsyncSocket::mIOService
protected

Definition at line 124 of file TurnAsyncSocket.hxx.

◆ mLifetime

unsigned int reTurn::TurnAsyncSocket::mLifetime
protected

Definition at line 150 of file TurnAsyncSocket.hxx.

◆ mLocalBinding

StunTuple reTurn::TurnAsyncSocket::mLocalBinding
protected

Definition at line 129 of file TurnAsyncSocket.hxx.

◆ mLocalHmacKey

resip::Data reTurn::TurnAsyncSocket::mLocalHmacKey
protected

Definition at line 142 of file TurnAsyncSocket.hxx.

◆ mNonce

resip::Data reTurn::TurnAsyncSocket::mNonce
protected

Definition at line 136 of file TurnAsyncSocket.hxx.

◆ mPassword

resip::Data reTurn::TurnAsyncSocket::mPassword
protected

Definition at line 133 of file TurnAsyncSocket.hxx.

◆ mRealm

resip::Data reTurn::TurnAsyncSocket::mRealm
protected

Definition at line 135 of file TurnAsyncSocket.hxx.

◆ mRelayTransportType

StunTuple::TransportType reTurn::TurnAsyncSocket::mRelayTransportType
protected

Definition at line 149 of file TurnAsyncSocket.hxx.

◆ mRequestedTransportType

StunTuple::TransportType reTurn::TurnAsyncSocket::mRequestedTransportType
protected

Definition at line 145 of file TurnAsyncSocket.hxx.

◆ mSoftware

resip::Data reTurn::TurnAsyncSocket::mSoftware
protected

Definition at line 139 of file TurnAsyncSocket.hxx.

◆ mTurnAsyncSocketHandler

TurnAsyncSocketHandler* reTurn::TurnAsyncSocket::mTurnAsyncSocketHandler
protected

Definition at line 125 of file TurnAsyncSocket.hxx.

◆ mUsername

resip::Data reTurn::TurnAsyncSocket::mUsername
protected

Definition at line 132 of file TurnAsyncSocket.hxx.

◆ UnspecifiedBandwidth

unsigned int reTurn::TurnAsyncSocket::UnspecifiedBandwidth = 0xFFFFFFFF
static

Definition at line 45 of file TurnAsyncSocket.hxx.

◆ UnspecifiedIpAddress

asio::ip::address reTurn::TurnAsyncSocket::UnspecifiedIpAddress
static

Definition at line 47 of file TurnAsyncSocket.hxx.

◆ UnspecifiedLifetime

unsigned int reTurn::TurnAsyncSocket::UnspecifiedLifetime = 0xFFFFFFFF
static

Definition at line 44 of file TurnAsyncSocket.hxx.

◆ UnspecifiedToken

unsigned short reTurn::TurnAsyncSocket::UnspecifiedToken = 0
static

Definition at line 46 of file TurnAsyncSocket.hxx.


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