Connection.getType()
DESCRIPTION
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.
Possible values:
.RELAY // relay through the basestation
.DIRECT // directly connected
DECLARATION
public func getType() throws -> NabtoEdgeClientConnectionType
THROWS ERRORS
NOT_CONNECTED:
- if the connection is not yet established
STOPPED:
- if the connection is stopped
FAILED_WITH_DETAIL:
- if an unexpected connection type was returned by the underlying API
RETURNS
the connection type (.RELAY or .DIRECT)