frameAndSend

suspend fun frameAndSend(payload: ByteArray, sendBytes: suspend (ByteArray) -> Unit, flush: suspend () -> 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.