MeshBearer

interface MeshBearer : Bearer

Properties

Link copied to clipboard
abstract val isGatt: Boolean
Link copied to clipboard
abstract val isOpen: Boolean

Returns true if the bearer is open, false otherwise.

Link copied to clipboard
abstract val pdus: Flow<Pdu>

A flow that emits the Reassembled PDU received from the Proxy Protocol handler.

Link copied to clipboard
abstract val state: StateFlow<BearerEvent>

A flow that emits events whenever the bearer state changes.

Link copied to clipboard

List of supported PDU types.

Functions

Link copied to clipboard
abstract suspend fun close()

Closes the bearer.

Link copied to clipboard
abstract suspend fun open()

Opens the bearer.

Link copied to clipboard
abstract suspend fun send(pdu: ByteArray, type: PduType)

Sends the given data over the bearer. Data longer than MTU will automatically be segmented using the bearer protocol if bearer implements segmentation.

Link copied to clipboard
open fun supports(type: PduType): Boolean

Returns whether the bearer supports the given message type.