74 std::shared_ptr<FlowContext>
context =
nullptr);
94 void send(
char* buffer,
unsigned int size);
95 void sendTo(
const asio::ip::address& address,
unsigned short port,
char* buffer,
unsigned int size);
96 void rawSendTo(
const asio::ip::address& address,
unsigned short port,
const char* buffer,
unsigned int size);
99 asio::error_code
receive(
char* buffer,
unsigned int& size,
unsigned int timeout, asio::ip::address* sourceAddress=0,
unsigned short*
sourcePort=0);
100 asio::error_code
receiveFrom(
const asio::ip::address& address,
unsigned short port,
char* buffer,
unsigned int& size,
unsigned int timeout);
135 asio::io_context& mIOService;
136 asio::ssl::context& mSslContext;
140 unsigned int mComponentId;
150 std::shared_ptr<RTCPEventLoggingHandler> mRtcpEventLoggingHandler;
153 std::shared_ptr<FlowContext> mFlowContext;
156 std::shared_ptr<TurnAsyncSocket> mTurnSocket;
166 std::shared_ptr<resip::Mutex> mSharedMutex;
172 asio::ip::address mActiveDestinationAddress;
173 unsigned short mActiveDestinationPort;
176 std::map<reTurn::StunTuple, dtls::DtlsSocket*> mDtlsSockets;
184 static const size_t MaxDtlsSockets = 8;
185 std::unique_ptr<dtls::DtlsListener> mDtlsListener;
186 bool mDtlsSocketLimitLogged =
false;
196 ReceivedData(
const asio::ip::address& address,
unsigned short port, std::shared_ptr<DataBuffer> data) :
197 mAddress(address), mPort(port), mData(data) {}
199 asio::ip::address mAddress;
200 unsigned short mPort;
201 std::shared_ptr<DataBuffer> mData;
205 ReceivedDataFifo mReceivedDataFifo;
208 bool processSendData(
char* buffer,
unsigned int& size,
const asio::ip::address& address,
unsigned short port);
209 asio::error_code processReceivedData(
char* buffer,
unsigned int& size, ReceivedData*
receivedData, asio::ip::address* sourceAddress=0,
unsigned short*
sourcePort=0);
210 FakeSelectSocketDescriptor mFakeSelectSocketDescriptor;
212 virtual void onConnectSuccess(
unsigned int socketDesc,
const asio::ip::address& address,
unsigned short port);
213 virtual void onConnectFailure(
unsigned int socketDesc,
const asio::error_code&
e);
216 virtual void onSharedSecretFailure(
unsigned int socketDesc,
const asio::error_code&
e);
222 virtual void onAllocationFailure(
unsigned int socketDesc,
const asio::error_code&
e);
225 virtual void onRefreshFailure(
unsigned int socketDesc,
const asio::error_code&
e);
227 virtual void onSetActiveDestinationSuccess(
unsigned int socketDesc);
228 virtual void onSetActiveDestinationFailure(
unsigned int socketDesc,
const asio::error_code &
e);
229 virtual void onClearActiveDestinationSuccess(
unsigned int socketDesc);
230 virtual void onClearActiveDestinationFailure(
unsigned int socketDesc,
const asio::error_code &
e);
234 virtual void onChannelBindFailure(
unsigned int socketDesc,
const asio::error_code&
e);
237 virtual void onReceiveSuccess(
unsigned int socketDesc,
const asio::ip::address& address,
unsigned short port,
const std::shared_ptr<DataBuffer>& data);
238 virtual void onReceiveFailure(
unsigned int socketDesc,
const asio::error_code&
e);
240 virtual void onSendSuccess(
unsigned int socketDesc);
241 virtual void onSendFailure(
unsigned int socketDesc,
const asio::error_code&
e);
void send(char *buffer, unsigned int size)
Turn Send Methods WARNING - if using Secure media, then there must be room at the end of the passed i...
asio::error_code receive(char *buffer, unsigned int &size, unsigned int timeout, asio::ip::address *sourceAddress=0, unsigned short *sourcePort=0)
Receive Methods.