PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PTURNUDPSocket Class Reference

#include <pstun.h>

Inheritance diagram for PTURNUDPSocket:
Collaboration diagram for PTURNUDPSocket:

Public Member Functions

 PTURNUDPSocket (PNatMethod::Component component)
 
 ~PTURNUDPSocket ()
 
virtual const char * GetNatName () const
 
virtual bool Close ()
 
virtual void GetCandidateInfo (PNatCandidate &candidate)
 
int OpenTURN (PTURNClient &client)
 
- Public Member Functions inherited from PSTUNUDPSocket
 PSTUNUDPSocket (PNatMethod::Component component)
 
bool OpenSTUN (PSTUNClient &client)
 
bool BaseWriteTo (const void *buf, PINDEX len, const PIPSocketAddressAndPort &ap)
 
bool BaseReadFrom (void *buf, PINDEX len, PIPSocketAddressAndPort &ap)
 
- Public Member Functions inherited from PSTUN
 PSTUN ()
 
virtual ~PSTUN ()
 
virtual PNatMethod::NatTypes DoRFC3489Discovery (PSTUNUDPSocket *socket, const PIPSocketAddressAndPort &serverAddress, PIPSocketAddressAndPort &baseAddressAndPort, PIPSocketAddressAndPort &externalAddressAndPort)
 Determine the NAT type using RFC3489 discovery method. More...
 
virtual PNatMethod::NatTypes FinishRFC3489Discovery (PSTUNMessage &responseI, PSTUNUDPSocket *socket, PIPSocketAddressAndPort &externalAddressAndPort)
 
virtual int MakeAuthenticatedRequest (PSTUNUDPSocket *socket, PSTUNMessage &request, PSTUNMessage &response)
 
virtual bool GetFromBindingResponse (const PSTUNMessage &response, PIPSocketAddressAndPort &externalAddress)
 
virtual void AppendMessageIntegrity (PSTUNMessage &message)
 
virtual void SetCredentials (const PString &username, const PString &password, const PString &realm)
 
virtual const PTimeInterval GetTimeout () const
 Get the timeout for responses from STUN server. More...
 
virtual void SetTimeout (const PTimeInterval &timeout)
 Set the timeout for responses from STUN server. More...
 
virtual PINDEX GetRetries () const
 Get the number of retries for responses from STUN server. More...
 
virtual void SetRetries (PINDEX retries)
 Set the number of retries for responses from STUN server. More...
 

Protected Member Functions

bool InternalGetLocalAddress (PIPSocketAddressAndPort &addr)
 
bool InternalWriteTo (const Slice *slices, size_t sliceCount, const PIPSocketAddressAndPort &ipAndPort)
 
bool InternalReadFrom (Slice *slices, size_t sliceCount, PIPSocketAddressAndPort &ipAndPort)
 
void InternalSetSendAddress (const PIPSocketAddressAndPort &addr)
 
void InternalGetSendAddress (PIPSocketAddressAndPort &addr)
 
- Protected Member Functions inherited from PSTUNUDPSocket
bool InternalGetLocalAddress (PIPSocketAddressAndPort &addr)
 

Protected Attributes

bool m_allocationMade
 
int m_channelNumber
 
bool m_usingTURN
 
BYTE m_protocol
 
PIPSocketAddressAndPort m_relayedAddress
 
DWORD m_lifeTime
 
PIPSocketAddressAndPort m_peerIpAndPort
 
std::vector< Slice > m_txVect
 
PTURNChannelHeader m_txHeader
 
BYTE m_txPadding [4]
 
std::vector< Slice > m_rxVect
 
PTURNChannelHeader m_rxHeader
 
BYTE m_rxPadding [4]
 
- Protected Attributes inherited from PSTUNUDPSocket
PIPSocketAddressAndPort m_serverReflexiveAddress
 
PIPSocketAddressAndPort m_baseAddressAndPort
 

Additional Inherited Members

- Public Types inherited from PSTUN
enum  { DefaultPort = 3478 }
 
enum  { MinChannelNumber = 0x4000, MaxChannelNumber = 0x7ffe }
 
- Public Attributes inherited from PSTUN
PINDEX m_pollRetries
 
PSASLString m_userName
 
PSASLString m_realm
 
PSASLString m_nonce
 
PBYTEArray m_password
 
PIPSocket::Address m_interface
 
PIPSocketAddressAndPort m_serverAddress
 
PTimeInterval replyTimeout
 

Constructor & Destructor Documentation

PTURNUDPSocket::PTURNUDPSocket ( PNatMethod::Component  component)
PTURNUDPSocket::~PTURNUDPSocket ( )

Member Function Documentation

virtual bool PTURNUDPSocket::Close ( )
virtual
virtual void PTURNUDPSocket::GetCandidateInfo ( PNatCandidate &  candidate)
virtual

Reimplemented from PSTUNUDPSocket.

virtual const char* PTURNUDPSocket::GetNatName ( ) const
virtual

Reimplemented from PSTUNUDPSocket.

bool PTURNUDPSocket::InternalGetLocalAddress ( PIPSocketAddressAndPort addr)
protected
void PTURNUDPSocket::InternalGetSendAddress ( PIPSocketAddressAndPort addr)
protected
bool PTURNUDPSocket::InternalReadFrom ( Slice *  slices,
size_t  sliceCount,
PIPSocketAddressAndPort ipAndPort 
)
protected
void PTURNUDPSocket::InternalSetSendAddress ( const PIPSocketAddressAndPort addr)
protected
bool PTURNUDPSocket::InternalWriteTo ( const Slice *  slices,
size_t  sliceCount,
const PIPSocketAddressAndPort ipAndPort 
)
protected
int PTURNUDPSocket::OpenTURN ( PTURNClient client)

Member Data Documentation

bool PTURNUDPSocket::m_allocationMade
protected
int PTURNUDPSocket::m_channelNumber
protected
DWORD PTURNUDPSocket::m_lifeTime
protected
PIPSocketAddressAndPort PTURNUDPSocket::m_peerIpAndPort
protected
BYTE PTURNUDPSocket::m_protocol
protected
PIPSocketAddressAndPort PTURNUDPSocket::m_relayedAddress
protected
PTURNChannelHeader PTURNUDPSocket::m_rxHeader
protected
BYTE PTURNUDPSocket::m_rxPadding[4]
protected
std::vector<Slice> PTURNUDPSocket::m_rxVect
protected
PTURNChannelHeader PTURNUDPSocket::m_txHeader
protected
BYTE PTURNUDPSocket::m_txPadding[4]
protected
std::vector<Slice> PTURNUDPSocket::m_txVect
protected
bool PTURNUDPSocket::m_usingTURN
protected

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