connect

suspend fun connect(localDeviceName: String, authValidator: suspend (String) -> Boolean = { true }): Result<Connection>

Tries to connect to the remote endpoint and returns a Connection if result is successful

Parameters

localDeviceName

name of the caller that tries to connect

authValidator

optional auth validator. If not provided, all connections are accepted, otherwise the caller will be able to choose whether to accept or reject the connection.