Package org.linphone.core

# Interface TunnelConfig

public interface TunnelConfig
Tunnel settings.

## Method Summary

Modifier and Type
Method
Description
`int`
`getDelay()`
Get the UDP packet round trip delay in ms for a tunnel configuration.
`String`
`getHost()`
Get the IP address or hostname of the tunnel server.
`String`
`getHost2()`
Get the IP address or hostname of the second tunnel server when using dual
tunnel client.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`int`
`getPort()`
Get the TLS port of the tunnel server.
`int`
`getPort2()`
Get the TLS port of the second tunnel server when using dual tunnel client.
`int`
`getRemoteUdpMirrorPort()`
Get the remote port on the tunnel server side used to test UDP reachability.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`void`
`setDelay(int delay)`
Set the UDP packet round trip delay in ms for a tunnel configuration.
`void`
`setHost(String host)`
Set the IP address or hostname of the tunnel server.
`void`
`setHost2(String host)`
Set the IP address or hostname of the second tunnel server when using dual
tunnel client.
`void`
`setPort(int port)`
Set tls port of server.
`void`
`setPort2(int port)`
Set tls port of the second server when using dual tunnel client.
`void`
`setRemoteUdpMirrorPort(int remoteUdpMirrorPort)`
Set the remote port on the tunnel server side used to test UDP reachability.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`String`
`toString()`

## Method Details

### getDelay

int getDelay()
Get the UDP packet round trip delay in ms for a tunnel configuration.

Returns:
  The UDP packet round trip delay in ms.

### setDelay

void setDelay(int delay)
Set the UDP packet round trip delay in ms for a tunnel configuration.

Parameters:
  `delay` - The UDP packet round trip delay in ms considered as acceptable
  (recommended value is 1000 ms).

### getHost

@Nullable String getHost()
Get the IP address or hostname of the tunnel server.

Returns:
  The tunnel server IP address or hostname.

### setHost

void setHost(@Nullable String host)
Set the IP address or hostname of the tunnel server.

Parameters:
  `host` - The tunnel server IP address or hostname.

### getHost2

@Nullable String getHost2()
Get the IP address or hostname of the second tunnel server when using dual
tunnel client.

Returns:
  The tunnel server IP address or hostname.

### setHost2

void setHost2(@Nullable String host)
Set the IP address or hostname of the second tunnel server when using dual
tunnel client.

Parameters:
  `host` - The tunnel server IP address or hostname.

### getPort

int getPort()
Get the TLS port of the tunnel server.

Returns:
  The TLS port of the tunnel server

### setPort

void setPort(int port)
Set tls port of server.

Parameters:
  `port` - The tunnel server TLS port, recommended value is 443

### getPort2

int getPort2()
Get the TLS port of the second tunnel server when using dual tunnel client.

Returns:
  The TLS port of the tunnel server

### setPort2

void setPort2(int port)
Set tls port of the second server when using dual tunnel client.

Parameters:
  `port` - The tunnel server TLS port, recommended value is 443

### getRemoteUdpMirrorPort

int getRemoteUdpMirrorPort()
Get the remote port on the tunnel server side used to test UDP reachability.
This is used when the mode is set auto, to detect whether the tunnel has to be
enabled or not.

Returns:
  The remote port on the tunnel server side used to test UDP reachability

### setRemoteUdpMirrorPort

void setRemoteUdpMirrorPort(int remoteUdpMirrorPort)
Set the remote port on the tunnel server side used to test UDP reachability.
This is used when the mode is set auto, to detect whether the tunnel has to be
enabled or not.

Parameters:
  `remoteUdpMirrorPort` - The remote port on the tunnel server side used to
  test UDP reachability, set to -1 to disable the feature

### setUserData

void setUserData(Object data)
Sets the object to store in this object user's data

Parameters:
  `data` - the object to store

### getUserData

Object getUserData()
Gets the object stored in this object user's data

Returns:
  the object store if any, null otherwise

### getNativePointer

long getNativePointer()
Gets the native pointer used by this class to make native method calls.

Returns:
  the nativer pointer, as long

### toString

String toString()

Overrides:
  `toString` in class `Object`