Connection

interface Connection

A connection between two devices.

Inheritors

Properties

Link copied to clipboard
abstract val id: String
Link copied to clipboard
abstract val name: String

Functions

Link copied to clipboard
abstract suspend fun close()

Closes the connection

Link copied to clipboard
abstract suspend fun getPayload(): Flow<ByteArray>

Returns a Flow of payloads received from a remote endpoint. Once connection is closed the flow will complete

Link copied to clipboard
abstract suspend fun sendPayload(payload: ByteArray): Result<Unit>

Sends a payload to a remote endpoint