ITcpTunnel.OpenAsync()
DESCRIPTION
Open this tunnel without blocking. The returned task can fail with:
DECLARATION
System.Threading.Tasks.Task OpenAsync(System.String, UInt16)
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 withgetLocalPort().
ERRORS
T:Nabto.Edge.Client.NabtoException: Thrown with error codeNOT_FOUNDif requesting an unknown service.T:Nabto.Edge.Client.NabtoException: Thrown with error codeFORBIDDENif target device did not allow opening a tunnel to specified service for the current client.T:Nabto.Edge.Client.NabtoException: Thrown with error codeSTOPPEDif the tunnel is stopped.T:Nabto.Edge.Client.NabtoException: Thrown with error codeNOT_CONNECTEDif the connection is not established yet..T:Nabto.Edge.Client.NabtoException: Thrown with error codePRIVILEGED_PORTif the connection is not established because the port is privileged and the user does not have access to start a listening socket on that port number.
RETURNS
The Task that will complete once the tunnel is opened.