connect

abstract suspend fun connect(endpoint: String, localDeviceName: String, remoteDeviceName: String, isIncomingConnection: Boolean, authValidator: suspend (String) -> Boolean): Result<Connection>

Establishes a connection with a remote endpoint.

Parameters

endpoint

remote endpoint

localDeviceName

name of the local device that tries to connect

remoteDeviceName

name of the remote device

isIncomingConnection

true if connection is incoming, false if the initiator is the current device

authValidator

that is used to determine whether to accept or reject the connection