TcpTunnel.openAsync() Overload 1
DESCRIPTION
Open this tunnel asynchronously.
DECLARATION
public func openAsync(service: String,
localPort: UInt16,
closure: @escaping AsyncStatusReceiver)
PARAMETERS
service:
- The service to connect to on the remote device (as defined in the device's configuration), e.g. "http", "http-admin", "ssh", "rtsp".
localPort:
- The local port to listen on. If 0 is specified, an ephemeral port is used, it can be retrieved with
getLocalPort()
when the tunnel has been opened successfully. closure:
- Invoked when the tunnel is opened or an error occurs.
Overload 2
DESCRIPTION
Open this tunnel asynchronously.
DECLARATION
public func openAsync(service: String, localPort: UInt16) async throws
PARAMETERS
service:
- The service to connect to on the remote device (as defined in the device's configuration), e.g. "http", "http-admin", "ssh", "rtsp".
localPort:
- The local port to listen on. If 0 is specified, an ephemeral port is used, it can be retrieved with
getLocalPort()
.
THROWS ERRORS
STOPPED:
- if the connection
NOT_FOUND:
- if requesting an unknown service.
FORBIDDEN:
- if target device did not allow opening a tunnel to specified service for the current client