send

abstract suspend fun send(type: String, payload: String, participantId: ParticipantId? = null): Message

Suspends until the message is sent or until an error is encountered.

Return

a message

Parameters

type

a MIME type (e.g. "text/plain")

payload

actual content of the message

participantId

an optional unique identifier of the participant to send the message to

Throws

when there was an issue when sending the message