Class Tunnel
Linphone tunnel object.
Inherited Members
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class Tunnel : LinphoneObject
Properties
Activated
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
public bool Activated { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if tunnel is in use, false otherwise. |
Domain
Get the domain.
Declaration
public string Domain { get; set; }
Property Value
Type | Description |
---|---|
System.String | The domain. |
DualModeEnabled
Get the dual tunnel client mode.
Declaration
public bool DualModeEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if dual tunnel client mode is enabled, false otherwise |
Mode
Get the tunnel mode.
Declaration
public TunnelMode Mode { get; set; }
Property Value
Type | Description |
---|---|
TunnelMode | The current TunnelMode |
Servers
Get added servers.
Declaration
public IEnumerable<TunnelConfig> Servers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TunnelConfig> | The list of servers. |
SipEnabled
Check whether tunnel is set to transport SIP packets.
Declaration
public bool SipEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value telling whether SIP packets shall pass through the tunnel |
Username
Get the username.
Declaration
public string Username { get; set; }
Property Value
Type | Description |
---|---|
System.String | The username. |
Methods
AddServer(TunnelConfig)
Add a tunnel server configuration.
Declaration
public void AddServer(TunnelConfig tunnelConfig)
Parameters
Type | Name | Description |
---|---|---|
TunnelConfig | tunnelConfig | TunnelConfig object |
CleanServers()
Remove all tunnel server addresses previously entered with
Declaration
public void CleanServers()
Connected()
Check whether the tunnel is connected.
Declaration
public bool Connected()
Returns
Type | Description |
---|---|
System.Boolean | A boolean value telling if the tunnel is connected |
Reconnect()
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
public void Reconnect()
RemoveServer(TunnelConfig)
Remove a tunnel server configuration.
Declaration
public void RemoveServer(TunnelConfig tunnelConfig)
Parameters
Type | Name | Description |
---|---|---|
TunnelConfig | tunnelConfig | TunnelConfig object |
SetHttpProxy(String, Int32, String, String)
Set an optional http proxy to go through when connecting to tunnel server.
Declaration
public void SetHttpProxy(string host, int port, string username, string passwd)
Parameters
Type | Name | Description |
---|---|---|
System.String | host | http proxy host |
System.Int32 | port | http proxy port |
System.String | username | Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use null if not needed. |
System.String | passwd | Optional http proxy password. Use null if not needed. |
SetHttpProxyAuthInfo(String, String)
Set authentication info for the http proxy.
Declaration
public void SetHttpProxyAuthInfo(string username, string passwd)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | User name |
System.String | passwd | Password |