|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
#include <TurnTcpSocket.hxx>
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 | readHeader () |
| virtual void | readBody (unsigned int len) |
| virtual void | cancelSocket () |
| virtual void | handleReadHeader (const asio::error_code &e) |
| Handle completion of a read operation for first 32 bits. | |
| asio::error_code | openAndBind (asio::ip::tcp::socket &socket) |
| Opens socket and binds it to the local binding (address and port), for a connection attempt. | |
| asio::ip::tcp | protocol () const |
| The protocol (IPv4 or IPv6) of the local binding. | |
| asio::error_code | waitForConnectStep (asio::error_code &result, const std::function< void()> &cancel) |
| For a step of connect() started as an asynchronous operation that sets result (initially asio::error::would_block) when it completes: runs the io_context until it does, or until the connect timeout passes - when cancel() is called (eg. | |
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) |
Protected Attributes | |
| unsigned int | mConnectTimeout = 10000 |
| size_t | mPadding = 0 |
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 |
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 |
Static Protected Attributes inherited from reTurn::TurnSocket | |
| static const size_t | MaxReceivedWhileWaiting = 100 |
Definition at line 14 of file TurnTcpSocket.hxx.
|
explicit |
Definition at line 16 of file TurnTcpSocket.cxx.
|
protectedvirtual |
Implements reTurn::TurnSocket.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 168 of file TurnTcpSocket.cxx.
|
virtual |
Implements reTurn::TurnSocket.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 71 of file TurnTcpSocket.cxx.
Implements reTurn::TurnSocket.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 20 of file TurnTcpSocket.hxx.
Handle completion of a read operation for first 32 bits.
Definition at line 175 of file TurnTcpSocket.cxx.
|
protected |
Opens socket and binds it to the local binding (address and port), for a connection attempt.
The socket isn't opened before connect(), which makes a new one for each address it tries.
Definition at line 31 of file TurnTcpSocket.cxx.
|
protected |
The protocol (IPv4 or IPv6) of the local binding.
Definition at line 25 of file TurnTcpSocket.cxx.
|
protectedvirtual |
Implements reTurn::TurnSocket.
Definition at line 129 of file TurnTcpSocket.cxx.
|
protectedvirtual |
Implements reTurn::TurnSocket.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 113 of file TurnTcpSocket.cxx.
|
protectedvirtual |
Implements reTurn::TurnSocket.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 121 of file TurnTcpSocket.cxx.
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 161 of file TurnTcpSocket.cxx.
|
protectedvirtual |
Reimplemented in reTurn::TurnTlsSocket.
Definition at line 154 of file TurnTcpSocket.cxx.
Milliseconds the TCP connect to each address connect() tries may take - and, for TLS, the handshake - before it fails with asio::error::timed_out.
Default 10 seconds.
Definition at line 28 of file TurnTcpSocket.hxx.
|
protected |
For a step of connect() started as an asynchronous operation that sets result (initially asio::error::would_block) when it completes: runs the io_context until it does, or until the connect timeout passes - when cancel() is called (eg.
to close the socket), and timed_out is returned
Definition at line 46 of file TurnTcpSocket.cxx.
Definition at line 54 of file TurnTcpSocket.hxx.
|
protected |
Definition at line 56 of file TurnTcpSocket.hxx.