SendResult
Result of sending a message or payload to a peer, including delivery status and error details.
Fields
ok
Whether the send was accepted by the local transport layer.
val ok: Booleanerror
Optional error string when ok is false.
val error: String?traceId
Identifier for correlating logs and diagnostics.
val traceId: StringExample
p2p.sendMessage(peerId, payload) { result ->
if (!result.ok) {
log("send failed", result.traceId, result.error)
}
}