#include <OsNatSocketBaseImpl.h>
|
| OsNatSocketBaseImpl () |
|
virtual | ~OsNatSocketBaseImpl () |
|
virtual void | setReadNotification (OsNotification *pNotification) |
|
virtual | ~IStunSocket () |
|
virtual int | socketWrite (const char *buffer, int bufferLength, const char *ipAddress, int port, PacketType packetType=UNKNOWN_PACKET)=0 |
|
virtual UtlBoolean | getRelayIp (UtlString *ip, int *port)=0 |
|
virtual UtlBoolean | getMappedIp (UtlString *ip, int *port)=0 |
|
virtual void | enableTransparentReads (bool bEnable)=0 |
|
virtual void | enableStun (const char *szStunServer, int stunPort, int iKeepAlive, int stunOptions, bool bReadFromSocket)=0 |
|
virtual void | setStunAddress (const UtlString &address, const int iPort)=0 |
|
virtual void | setTurnAddress (const UtlString &address, const int iPort)=0 |
|
virtual void | markStunFailure ()=0 |
|
virtual void | markStunSuccess (bool bAddressChanged)=0 |
|
virtual void | markTurnFailure ()=0 |
|
virtual void | markTurnSuccess ()=0 |
|
virtual void | evaluateDestinationAddress (const UtlString &address, int iPort, int priority)=0 |
|
virtual void | enableTurn (const char *szTurnSever, int turnPort, int iKeepAlive, const char *username, const char *password, bool bReadFromSocket)=0 |
|
virtual void | readyDestination (const char *szAddress, int iPort)=0 |
|
virtual UtlBoolean | applyDestinationAddress (const char *szAddress, int iPort)=0 |
|
virtual UtlBoolean | getBestDestinationAddress (UtlString &address, int &iPort)=0 |
|
virtual void | addAlternateDestination (const char *szAddress, int iPort, int priority)=0 |
|
virtual void | destroy ()=0 |
|
|
void | markReadTime () |
|
void | markWriteTime () |
|
virtual bool | getFirstReadTime (OsDateTime &time) |
|
virtual bool | getLastReadTime (OsDateTime &time) |
|
virtual bool | getFirstWriteTime (OsDateTime &time) |
|
virtual bool | getLastWriteTime (OsDateTime &time) |
|
virtual void | handleStunMessage (char *pBuf, int length, UtlString &fromAddress, int fromPort) |
|
virtual void | handleTurnMessage (char *pBuf, int length, UtlString &fromAddress, int fromPort) |
|
virtual int | handleTurnDataIndication (char *buffer, int bufferLength, UtlString *pRecvFromIp, int *pRecvFromPort) |
|
virtual bool | handleSturnData (char *buffer, int &bufferLength, UtlString &receivedIp, int &receivedPort) |
|
virtual OsSocket * | getSocket ()=0 |
|
Set a notification object to be signaled when the first the data packet is received from the socket. Once this is signaled, the notification object is discarded.
Implements IStunSocket.
Reimplemented in OsNatDatagramSocket.
bool getFirstReadTime |
( |
OsDateTime & |
time | ) |
|
|
protectedvirtual |
Get the timestamp of the first read data packet (excluding any STUN/TURN/NAT packets).
Implements IStunSocket.
bool getLastReadTime |
( |
OsDateTime & |
time | ) |
|
|
protectedvirtual |
Get the timestamp of the last read data packet (excluding any STUN/TURN/NAT packets).
Implements IStunSocket.
bool getFirstWriteTime |
( |
OsDateTime & |
time | ) |
|
|
protectedvirtual |
Get the timestamp of the first written data packet (excluding any STUN/TURN/NAT packets).
Implements IStunSocket.
bool getLastWriteTime |
( |
OsDateTime & |
time | ) |
|
|
protectedvirtual |
Get the timestamp of the last written data packet (excluding any STUN/TURN/NAT packets).
Implements IStunSocket.
void handleStunMessage |
( |
char * |
pBuf, |
|
|
int |
length, |
|
|
UtlString & |
fromAddress, |
|
|
int |
fromPort |
|
) |
| |
|
protectedvirtual |
Handle/process an inbound STUN message.
void handleTurnMessage |
( |
char * |
pBuf, |
|
|
int |
length, |
|
|
UtlString & |
fromAddress, |
|
|
int |
fromPort |
|
) |
| |
|
protectedvirtual |
Handle/process an inbound TURN message.
int handleTurnDataIndication |
( |
char * |
buffer, |
|
|
int |
bufferLength, |
|
|
UtlString * |
pRecvFromIp, |
|
|
int * |
pRecvFromPort |
|
) |
| |
|
protectedvirtual |
Pull a data indication out of the buffer
bool handleSturnData |
( |
char * |
buffer, |
|
|
int & |
bufferLength, |
|
|
UtlString & |
receivedIp, |
|
|
int & |
receivedPort |
|
) |
| |
|
protectedvirtual |
Handle/process an inbound STUN or TURN message.
unsigned int miRecordTimes |
|
protected |
OsMutex mReadNotificationLock |
|
protected |