frameAndSend

suspend fun frameAndSend(payload: ByteArray, sendBytes: (ByteArray) -> Unit, flush: () -> Unit = {})(source)

Frames a payload into the Meshtastic stream protocol format: START2LSB lenpayload.

Thread-safe via an internal mutex — multiple callers can call this concurrently.