ProxyConnection

A connection to a GATT Proxy node.

ProxyConnection provides raw Network PDU access for advanced use cases. Most users should use MeshNetwork.send and MeshNetwork.incomingMessages instead.

Lifecycle

Obtained via MeshNetwork.connectProxy. close disconnects from the proxy node but does not close the underlying Peripheral.

Properties

Link copied to clipboard
abstract val incomingPdus: Flow<NetworkPdu>

Raw Network PDU stream from the mesh network.

Link copied to clipboard
abstract val isConnected: StateFlow<Boolean>

Whether the proxy connection is currently active.

Functions

Link copied to clipboard
abstract override fun close()

Close the proxy connection. Does NOT close the underlying Peripheral.

Link copied to clipboard
abstract suspend fun sendPdu(pdu: NetworkPdu)

Send a raw Network PDU into the mesh network.