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

#include <TurnUdpSocket.hxx>

Inheritance diagram for reTurn::TurnUdpSocket:
[legend]

Public Member Functions

 TurnUdpSocket (const asio::ip::address &address, unsigned short port)
 
virtual unsigned int getSocketDescriptor ()
 
virtual asio::error_code connect (const std::string &address, unsigned short port)
 
- Public Member Functions inherited from reTurn::TurnSocket
 TurnSocket (const asio::ip::address &address=UnspecifiedIpAddress, unsigned short port=0)
 
virtual ~TurnSocket ()
 
asio::error_code requestSharedSecret (char *username, unsigned int usernameSize, char *password, unsigned int passwordSize)
 
void setUsernameAndPassword (const char *username, const char *password, bool shortTermAuth=false)
 
void setSoftware (const char *software)
 
asio::error_code bindRequest ()
 
asio::error_code createAllocation (unsigned int lifetime=UnspecifiedLifetime, unsigned int bandwidth=UnspecifiedBandwidth, unsigned char requestedProps=StunMessage::PropsNone, uint64_t reservationToken=UnspecifiedToken, StunTuple::TransportType requestedTransportType=StunTuple::None)
 
asio::error_code refreshAllocation ()
 
asio::error_code destroyAllocation ()
 
StunTuple & getRelayTuple ()
 
StunTuple & getReflexiveTuple ()
 
unsigned int getLifetime ()
 
unsigned int getBandwidth ()
 
asio::error_code setActiveDestination (const asio::ip::address &address, unsigned short port)
 
asio::error_code clearActiveDestination ()
 
asio::error_code send (const char *buffer, unsigned int size)
 
asio::error_code sendTo (const asio::ip::address &address, unsigned short port, const char *buffer, unsigned int size)
 
asio::error_code receive (char *buffer, unsigned int &size, unsigned int timeout, asio::ip::address *sourceAddress=0, unsigned short *sourcePort=0)
 
asio::error_code receiveFrom (const asio::ip::address &address, unsigned short port, char *buffer, unsigned int &size, unsigned int timeout)
 

Protected Member Functions

virtual asio::error_code rawWrite (const char *buffer, unsigned int size)
 
virtual asio::error_code rawWrite (const std::vector< asio::const_buffer > &buffers)
 
virtual asio::error_code rawRead (unsigned int timeout, unsigned int *bytesRead, asio::ip::address *sourceAddress=0, unsigned short *sourcePort=0)
 
virtual void cancelSocket ()
 
- Protected Member Functions inherited from reTurn::TurnSocket
void startReadTimer (unsigned int timeout)
 
void handleRawRead (const asio::error_code &errorCode, size_t bytesRead)
 
void handleRawReadTimeout (const asio::error_code &errorCode)
 
void queueReceived (unsigned int size)
 

Additional Inherited Members

- Static Public Attributes inherited from reTurn::TurnSocket
static unsigned int UnspecifiedLifetime = 0xFFFFFFFF
 
static unsigned int UnspecifiedBandwidth = 0xFFFFFFFF
 
static unsigned short UnspecifiedToken = 0
 
static asio::ip::address UnspecifiedIpAddress = asio::ip::make_address("0.0.0.0")
 
- Protected Types inherited from reTurn::TurnSocket
typedef std::map< unsigned short, time_t > ChannelBindingRefreshTimeMap
 
- Protected Attributes inherited from reTurn::TurnSocket
StunTuple mLocalBinding
 
StunTuple mConnectedTuple
 
resip::Data mUsername
 
resip::Data mPassword
 
resip::Data mHmacKey
 
resip::Data mRealm
 
resip::Data mNonce
 
resip::Data mSoftware
 
unsigned int mRequestedLifetime
 
unsigned int mRequestedBandwidth
 
unsigned char mRequestedProps
 
uint64_t mReservationToken
 
StunTuple::TransportType mRequestedTransportType
 
bool mHaveAllocation
 
time_t mAllocationRefreshTime
 
StunTuple mRelayTuple
 
StunTuple mReflexiveTuple
 
unsigned int mLifetime
 
unsigned int mBandwidth
 
ChannelManager mChannelManager
 
ChannelBindingRefreshTimeMap mChannelBindingRefreshTimes
 
RemotePeer * mActiveDestination
 
asio::io_context mIOService
 
asio::steady_timer mReadTimer
 
size_t mBytesRead
 
asio::error_code mReadErrorCode
 
char mReadBuffer [8192]
 
char mWriteBuffer [8192]
 
bool mConnected
 
std::deque< std::vector< char > > mReceivedWhileWaiting
 
- Static Protected Attributes inherited from reTurn::TurnSocket
static const size_t MaxReceivedWhileWaiting = 100
 

Detailed Description

Definition at line 14 of file TurnUdpSocket.hxx.

Constructor & Destructor Documentation

◆ TurnUdpSocket()

reTurn::TurnUdpSocket::TurnUdpSocket ( const asio::ip::address &  address,
unsigned short  port 
)
explicit

Definition at line 12 of file TurnUdpSocket.cxx.

Member Function Documentation

◆ cancelSocket()

void reTurn::TurnUdpSocket::cancelSocket ( )
protectedvirtual

Implements reTurn::TurnSocket.

Definition at line 100 of file TurnUdpSocket.cxx.

◆ connect()

asio::error_code reTurn::TurnUdpSocket::connect ( const std::string &  address,
unsigned short  port 
)
virtual

Implements reTurn::TurnSocket.

Definition at line 28 of file TurnUdpSocket.cxx.

◆ getSocketDescriptor()

virtual unsigned int reTurn::TurnUdpSocket::getSocketDescriptor ( )
inlinevirtual

Implements reTurn::TurnSocket.

Definition at line 19 of file TurnUdpSocket.hxx.

◆ rawRead()

asio::error_code reTurn::TurnUdpSocket::rawRead ( unsigned int  timeout,
unsigned int *  bytesRead,
asio::ip::address *  sourceAddress = 0,
unsigned short *  sourcePort = 0 
)
protectedvirtual

Implements reTurn::TurnSocket.

Definition at line 73 of file TurnUdpSocket.cxx.

◆ rawWrite() [1/2]

asio::error_code reTurn::TurnUdpSocket::rawWrite ( const char *  buffer,
unsigned int  size 
)
protectedvirtual

Implements reTurn::TurnSocket.

Definition at line 57 of file TurnUdpSocket.cxx.

◆ rawWrite() [2/2]

asio::error_code reTurn::TurnUdpSocket::rawWrite ( const std::vector< asio::const_buffer > &  buffers)
protectedvirtual

Implements reTurn::TurnSocket.

Definition at line 65 of file TurnUdpSocket.cxx.


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