Connection.connect()

DESCRIPTION

Establish a connection synchronously.

When the function returns, the connection is established and can be used with CoAP requests, streams and tunnels.

DECLARATION

    public func connect() throws 

PARAMETERS

None.

ERRORS

Throws the following errors:

UNAUTHORIZED:
if the authentication options do not match the basestation configuration for this
TOKEN_REJECTED:
if the basestation could not validate the specified token
NO_CHANNELS:
if all parameters input were accepted but a connection could not be established. Details about what went wrong are available as the associated remoteError.
NO_CHANNELS.remoteError.NOT_ATTACHED:
if the target remote device is not attached to the basestation
NO_CHANNELS.remoteError.FORBIDDEN:
if the basestation request is rejected
NO_CHANNELS.remoteError.NONE:
if remote relay was not enabled
NO_CHANNELS.localError.NONE:
if mDNS discovery was not enabled

RETURN VALUES

None.

EXAMPLES

None.