NatPolicy
public class NatPolicy : LinphoneObject
Policy to use to pass through NATs/firewalls.
-
Undocumented
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> NatPolicy
-
Undocumented
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Enable ICE. ICE can be enabled without STUN/TURN, in which case only the local candidates will be used.
Declaration
Swift
public var iceEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable ICE. Tell whether ICE is enabled.
Return Value
Boolean value telling whether ICE is enabled.
-
Enable STUN. If TURN is also enabled, TURN will be used instead of STUN.
Declaration
Swift
public var stunEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable STUN. Tell whether STUN is enabled.
Return Value
Boolean value telling whether STUN is enabled.
-
Set the STUN/TURN server to use with this NAT policy. Used when STUN or TURN are enabled.
Declaration
Swift
public var stunServer: String { get set }
Parameters
stunServer
The STUN server to use with this NAT policy.
Get the STUN/TURN server to use with this NAT policy. Used when STUN or TURN are enabled.Return Value
The STUN server used by this NAT policy.
-
Set the username used to authenticate with the STUN/TURN server. The authentication will search for a
AuthInfo
with this username. If it is not set the username of the currently usedProxyConfig
is used to search for a LinphoneAuthInfo.Declaration
Swift
public var stunServerUsername: String { get set }
Parameters
username
The username used to authenticate with the STUN/TURN server.
Get the username used to authenticate with the STUN/TURN server. The authentication will search for aAuthInfo
with this username. If it is not set the username of the currently usedProxyConfig
is used to search for a LinphoneAuthInfo.Return Value
The username used to authenticate with the STUN/TURN server.
-
Enable TCP TURN transport. Used when TURN is enabled.
Declaration
Swift
public var tcpTurnTransportEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable TCP TURN transport. Tells whether TCP TURN transport is enabled. Used when TURN is enabled.
Return Value
Boolean value telling whether TCP TURN transport is enabled.
-
Enable TLS TURN transport. Used when TURN is enabled.
Declaration
Swift
public var tlsTurnTransportEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable TLS TURN transport. Tells whether TLS TURN transport is enabled. Used when TURN is enabled.
Return Value
Boolean value telling whether TLS TURN transport is enabled.
-
Enable TURN. If STUN is also enabled, it is ignored and TURN is used.
Declaration
Swift
public var turnEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable TURN. Tell whether TURN is enabled.
Return Value
Boolean value telling whether TURN is enabled.
-
Enable UDP TURN transport. Used when TURN is enabled.
Declaration
Swift
public var udpTurnTransportEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable UDP TURN transport. Tells whether UDP TURN transport is enabled. Used when TURN is enabled.
Return Value
Boolean value telling whether UDP TURN transport is enabled.
-
Enable uPnP. This has the effect to disable every other policies (ICE, STUN and TURN).
Declaration
Swift
public var upnpEnabled: Bool { get set }
Parameters
enable
Boolean value telling whether to enable uPnP. Tell whether uPnP is enabled.
Return Value
Boolean value telling whether uPnP is enabled.
-
Assign a user pointer to the
NatPolicy
object.Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Parameters
userData
The user pointer to associate with the
NatPolicy
object.
Retrieve the user pointer associated with theNatPolicy
object.Return Value
The user pointer associated with the
NatPolicy
object. -
Clear a NAT policy (deactivate all protocols and unset the STUN server).
Declaration
Swift
public func clear()
-
Clone an existing
NatPolicy
object. Clone aNatPolicy
object.Declaration
Swift
public func clone() -> NatPolicy?
Return Value
a new
NatPolicy
object. -
Start a STUN server DNS resolution.
Declaration
Swift
public func resolveStunServer()