IConnection.ConnectAsync()

DESCRIPTION

Establish this connection asynchronously.

DECLARATION

System.Threading.Tasks.Task ConnectAsync()

ERRORS

  • T:Nabto.Edge.Client.NabtoException: Thrown with error code INVALID_STATE if the connection is missing required options, for instance a valid private key.
  • T:Nabto.Edge.Client.NabtoException: Thrown with error code TIMEOUT if the channel to the device was created but the dtls connection to the device timed out.
  • T:Nabto.Edge.Client.NabtoException: Thrown with error code STOPPED if the client instance was stopped.
  • T:Nabto.Edge.Client.NabtoException: Thrown with error code DEVICE_INTERNAL_ERROR the device encountered an internal error during the dtls connect attempt. This is most likely due to no more connection resources available in the device.
  • T:Nabto.Edge.Client.NabtoException: Thrown with error code NO_CHANNELS if all parameters input were accepted but a connection could not be established for some reason. The specific reason can be retrieved using GetLocalChannelErrorCode() and GetRemoteChannelErrorCode().

RETURNS

Task completed when the connect attempt succeeds or fails.