Tunnel
public class Tunnel : LinphoneObject
Linphone tunnel object.
-
Undocumented
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> Tunnel
-
Undocumented
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Enum describing the tunnel modes.
See moreDeclaration
Swift
public enum Mode : Int
-
Returns whether the tunnel is activated. If mode is set to auto, this gives indication whether the automatic detection determined that tunnel was necessary or not.
Declaration
Swift
public var activated: Bool { get }
Return Value
true if tunnel is in use, false otherwise.
-
Get the domain.
Declaration
Swift
public var domain: String { get set }
Return Value
The domain.
-
Get the dual tunnel client mode.
Declaration
Swift
public var dualModeEnabled: Bool { get set }
Return Value
true if dual tunnel client mode is enabled, false otherwise
-
Get added servers.
Declaration
Swift
public var servers: [TunnelConfig] { get }
Return Value
The list of servers.
-
Check whether tunnel is set to transport SIP packets.
Declaration
Swift
public var sipEnabled: Bool { get set }
Return Value
A boolean value telling whether SIP packets shall pass through the tunnel
-
Get the username.
Declaration
Swift
public var username: String { get set }
Return Value
The username.
-
Add a tunnel server configuration.
Declaration
Swift
public func addServer(tunnelConfig: TunnelConfig)
Parameters
tunnelConfig
TunnelConfig
object -
Remove all tunnel server addresses previously entered with addServer()
Declaration
Swift
public func cleanServers()
-
Check whether the tunnel is connected.
Declaration
Swift
public func connected() -> Bool
Return Value
A boolean value telling if the tunnel is connected
-
Force reconnection to the tunnel server. This method is useful when the device switches from wifi to Edge/3G or vice versa. In most cases the tunnel client socket won’t be notified promptly that its connection is now zombie, so it is recommended to call this method that will cause the lost connection to be closed and new connection to be issued.
Declaration
Swift
public func reconnect()
-
Remove a tunnel server configuration.
Declaration
Swift
public func removeServer(tunnelConfig: TunnelConfig)
Parameters
tunnelConfig
TunnelConfig
object -
Set an optional http proxy to go through when connecting to tunnel server.
Declaration
Swift
public func setHttpProxy(host: String, port: Int, username: String?, passwd: String?)
Parameters
host
http proxy host
port
http proxy port
username
Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use nil if not needed.
passwd
Optional http proxy password. Use nil if not needed.
-
Set authentication info for the http proxy.
Declaration
Swift
public func setHttpProxyAuthInfo(username: String?, passwd: String?)
Parameters
username
User name
passwd
Password