Get the type of this connection.
Note that the type may change. All remote connections start out as relay connections. Listen for ConnectionEvents using addConnectionEventsReceiver to get notified if the type changes.
.RELAY // relay through the basestation
.DIRECT // directly connected
public func getType() throws -> NabtoEdgeClientConnectionType
- if the connection is not yet established
- if the connection is stopped
- if an unexpected connection type was returned by the underlying API
the connection type (.RELAY or .DIRECT)