DirectConnection

class DirectConnection(val id: String, val name: String, receiveFlow: Flow<ByteArray>) : Connection

Direct implementation of Connection.

Constructors

Link copied to clipboard
constructor(id: String, name: String, receiveFlow: Flow<ByteArray>)

Properties

Link copied to clipboard
open override val id: String
Link copied to clipboard
open override val name: String

Functions

Link copied to clipboard
open suspend override fun close()

Closes the connection

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open suspend override 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
open override fun hashCode(): Int
Link copied to clipboard
open suspend override fun sendPayload(payload: ByteArray): Result<Unit>

Sends a payload to a remote endpoint