PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PTURNUDPSocket Class Reference

`#include <pstun.h>`

Inheritance diagram for PTURNUDPSocket:
[legend]
Collaboration diagram for PTURNUDPSocket:
[legend]

## Public Member Functions
| PTURNUDPSocket ()
| ~PTURNUDPSocket ()
virtual bool | Close ()
virtual PNatCandidate | GetCandidateInfo ()
int | OpenTURN (PTURNClient &client)
Public Member Functions inherited from PSTUNUDPSocket
| PSTUNUDPSocket ()
bool | OpenSTUN (PSTUNClient &client)
PNatCandidate | GetCandidateInfo ()
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)
bool | InternalGetBaseAddress (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
PNatMethod::NatTypes | m_natType
PINDEX | m_pollRetries
PTime | m_timeAddressObtained
PString | m_userName
PString | m_realm
PString | m_nonce
PBYTEArray | m_credentialsHash
PIPSocket::Address | m_interface
PIPSocketAddressAndPort | m_serverAddress
PTimeInterval | replyTimeout

## Constructor & Destructor Documentation

PTURNUDPSocket::PTURNUDPSocket | ( |  | ) |

PTURNUDPSocket::~PTURNUDPSocket | ( |  | ) |

## Member Function Documentation

virtual bool PTURNUDPSocket::Close | ( |  | ) |
| virtual

virtual PNatCandidate PTURNUDPSocket::GetCandidateInfo | ( |  | ) |
| virtual

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:

- pstun.h