IConnection.ConnectAsync()
DESCRIPTION
Establish this connection asynchronously.
DECLARATION
System.Threading.Tasks.Task ConnectAsync()
ERRORS
T:Nabto.Edge.Client.NabtoException
: Thrown with error codeINVALID_STATE
if the connection is missing required options, for instance a valid private key.T:Nabto.Edge.Client.NabtoException
: Thrown with error codeTIMEOUT
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 codeSTOPPED
if the client instance was stopped.T:Nabto.Edge.Client.NabtoException
: Thrown with error codeDEVICE_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 codeNO_CHANNELS
if all parameters input were accepted but a connection could not be established for some reason. The specific reason can be retrieved usingGetLocalChannelErrorCode()
andGetRemoteChannelErrorCode()
.
RETURNS
Task completed when the connect attempt succeeds or fails.