Establish a connection synchronously.
When the function returns, the connection is established and can be used with CoAP requests, streams and tunnels.
public func connect() throws
Throws the following errors:
- if the authentication options do not match the basestation configuration for this
- if the basestation could not validate the specified token
- if all parameters input were accepted but a connection could not be established. Details about what went wrong are available as the associated remoteError.
- if the target remote device is not attached to the basestation
- if the basestation request is rejected
- if remote relay was not enabled
- if mDNS discovery was not enabled