zdk.net
Public Member Functions | Public Attributes | Properties | List of all members
ZDK_NET::StunConfig Class Reference

STUN specific account configuration. More...

#include <StunConfig.h>

Inheritance diagram for ZDK_NET::StunConfig:
ZDK_NET::ZHandle

Public Member Functions

 StunConfig (ZDK::Shared::StunConfig src)
 
bool IsEqual (ZDK_NET::StunConfig^ comp)
 Compares the current configuration with the given one. More...
 
virtual long long Handle () override
 
virtual void Initialize () override
 
virtual void ReleaseReference () override
 

Public Attributes

ZDK::IStunConfig * cppRef = nullptr
 

Properties

bool STUNEnabled [get, set]
 Configures the use of STUN functionality as described in RFC 3489. More...
 
System::String^ STUNServer [get, set]
 Configures the address of the STUN server. More...
 
int STUNPort [get, set]
 Configures the port of the STUN server. More...
 
int STUNRefresh [get, set]
 Configures the refresh period of the STUN server. More...
 
bool UseDnsSrvRequests [get, set]
 Configures the use of DNS SRV requests in a STUN server. More...
 
bool AllowOnPrivateAddress [get, set]
 Configures whether a STUN server on PRIVATE IP address may be used. More...
 
bool AllowWithPrivateSipServer [get, set]
 Configures whether a STUN may be used with SIP server on PRIVATE IP address. More...
 

Detailed Description

STUN specific account configuration.

The STUN server allows clients to find out their public address, the type of NAT they are behind and the Internet side port associated by the NAT with a particular local port. This information is used to set up communication between the client and the VoIP provider to establish a call. The STUN protocol is defined in RFC 3489.

STUN servers are usually contacted on UDP port 3478, however the server can hint clients to perform tests on alternate IP and port number too (STUN servers can have multiple IP addresses).

Member Function Documentation

◆ IsEqual()

bool ZDK_NET::StunConfig::IsEqual ( ZDK_NET::StunConfig comp)

Compares the current configuration with the given one.

Parameters
[in]compSTUN configuration to be compared
Returns
  • 0 - not equal
  • 1 - equal

Property Documentation

◆ AllowOnPrivateAddress

bool ZDK_NET::StunConfig::AllowOnPrivateAddress
getset

Configures whether a STUN server on PRIVATE IP address may be used.

Configures whether to allow or not using STUN on PRIVATE address.

NOTE! It is not consider a failure to have configured or the resolved STUN server to be on PRIVATE address. In such a cases, the STUN is silently disabled (like done behind SYMMETRIC NATs for example).

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ AllowWithPrivateSipServer

bool ZDK_NET::StunConfig::AllowWithPrivateSipServer
getset

Configures whether a STUN may be used with SIP server on PRIVATE IP address.

Configures whether to allow or not using STUN with SIP server on PRIVATE address.

NOTE! It is not consider a failure to have configured or the resolved SIP server to be on PRIVATE address. In such a cases, the STUN is silently disabled (like done behind SYMMETRIC NATs for example).

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ STUNEnabled

bool ZDK_NET::StunConfig::STUNEnabled
getset

Configures the use of STUN functionality as described in RFC 3489.

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ STUNPort

int ZDK_NET::StunConfig::STUNPort
getset

Configures the port of the STUN server.

Specifies the port of the STUN server. The default port is 3478.

Parameters
[in]valueThe port of the server

◆ STUNRefresh

int ZDK_NET::StunConfig::STUNRefresh
getset

Configures the refresh period of the STUN server.

Specifies how often to refresh the STUN server. The default is 30 seconds. The refresh can be used to keep the NAT mapping alive.

Parameters
[in]valueThe refresh period in milliseconds (30000 default)
See also
KeepAlive()

◆ STUNServer

System:: String^ ZDK_NET::StunConfig::STUNServer
getset

Configures the address of the STUN server.

Configures the address (hostname) of the STUN server.

Parameters
[in]valueHostname of the server

◆ UseDnsSrvRequests

bool ZDK_NET::StunConfig::UseDnsSrvRequests
getset

Configures the use of DNS SRV requests in a STUN server.

Configures the use of DNS SRV requests to find the given STUN server's address. This is disabled by default and must be explicitly set to non-zero for this to work.

If SRV requests are enabled, the STUN manager will use all results returned from the SRV query, should any actual STUN requests fail.

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

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