Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PSTUNClient::IsAvailable (  ) [virtual]

Returns whether the Nat Method is ready and available in assisting in NAT Traversal. The principal is this function is to allow the EP to detect various methods and if a method is detected then this method is available for NAT traversal. The availablity of the STUN Method is dependant on the Type of NAT being used.

Reimplemented from PNatMethod.

Definition at line 788 of file pstun.cxx.

References GetNatType().


  switch (GetNatType(FALSE)) {
    case ConeNat :
    case RestrictedNat :
    case PortRestrictedNat :

    case SymmetricNat :
      if (pairedPortInfo.basePort == 0 || pairedPortInfo.basePort > pairedPortInfo.maxPort)
         return FALSE;

    default : // UnknownNet, SymmetricFirewall, BlockedNat
      return FALSE;

  return TRUE; 

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index