ZDK
Public Member Functions | List of all members
ZDK::IStunConfig Class Referenceabstract

STUN specific account configuration. More...

#include <IStunConfig.h>

Inheritance diagram for ZDK::IStunConfig:
ZDK::IZHandle

Public Member Functions

virtual bool STUNEnabled () const =0
 Gets the use of STUN functionality as described in RFC 3489. More...
 
virtual void STUNEnabled (bool value)=0
 Configures the use of STUN functionality as described in RFC 3489. More...
 
virtual ZDK::Shared::String STUNServer () const =0
 Gets the configured address of the STUN server. More...
 
virtual void STUNServer (ZDK::Shared::String value)=0
 Configures the address of the STUN server. More...
 
virtual int STUNPort () const =0
 Gets the configured port of the STUN server. More...
 
virtual void STUNPort (int value)=0
 Configures the port of the STUN server. More...
 
virtual int STUNRefresh () const =0
 Gets the configured refresh period of the STUN server. More...
 
virtual void STUNRefresh (int value)=0
 Configures the refresh period of the STUN server. More...
 
virtual bool IsEqual (ZDK::Shared::StunConfig comp) const =0
 Compares the current configuration with the given one. More...
 
- Public Member Functions inherited from ZDK::IZHandle
virtual ZDK::ZDKHandle Handle () const =0
 
virtual operator ZDK::ZDKHandle () const =0
 
virtual void Initialize ()=0
 
virtual void ReleaseReference ()=0
 

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()

virtual bool ZDK::IStunConfig::IsEqual ( ZDK::Shared::StunConfig  comp) const
pure virtual

Compares the current configuration with the given one.

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

◆ STUNEnabled() [1/2]

virtual bool ZDK::IStunConfig::STUNEnabled ( ) const
pure virtual

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

Returns
  • 0 - disabled
  • 1 - enabled

◆ STUNEnabled() [2/2]

virtual void ZDK::IStunConfig::STUNEnabled ( bool  value)
pure virtual

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

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

◆ STUNPort() [1/2]

virtual int ZDK::IStunConfig::STUNPort ( ) const
pure virtual

Gets the configured port of the STUN server.

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

Returns
The port of the server

◆ STUNPort() [2/2]

virtual void ZDK::IStunConfig::STUNPort ( int  value)
pure virtual

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() [1/2]

virtual int ZDK::IStunConfig::STUNRefresh ( ) const
pure virtual

Gets the configured 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.

Returns
The refresh period in milliseconds (30000 default)
See also
KeepAlive()

◆ STUNRefresh() [2/2]

virtual void ZDK::IStunConfig::STUNRefresh ( int  value)
pure virtual

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() [1/2]

virtual ZDK::Shared::String ZDK::IStunConfig::STUNServer ( ) const
pure virtual

Gets the configured address of the STUN server.

Configures the address (hostname) of the STUN server.

Returns
Hostname of the server

◆ STUNServer() [2/2]

virtual void ZDK::IStunConfig::STUNServer ( ZDK::Shared::String  value)
pure virtual

Configures the address of the STUN server.

Configures the address (hostname) of the STUN server.

Parameters
[in]valueHostname of the server

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