send

suspend fun RadioClient.send(block: SendBuilder.() -> Unit): MessageHandle(source)

DSL form of RadioClient.send. Builds a MeshPacket via SendBuilder and enqueues it.

Example:

val handle = client.send {
text("hello world")
to(NodeId(0xa1b2c3d4.toInt()))
channel(ChannelIndex(2))
wantAck()
hopLimit(3)
}

Since

0.1.0

Throws

if zero or more than one payload setter was called