DataMessage

One message sent by a remote participant's Room.send, delivered via RoomEventListener.onDataReceived.

A frame carries either text or bytes, never both — they are distinct frame types on the wire and the sender's choice is preserved. Read isBinary first, then take text or data; the other is always null.

The receive half of Room.send, and lower-level than Room.PubSub: no topic, no persistence, no replay for late joiners.

Properties

Link copied to clipboard

The decoded binary payload, or null when isBinary is false.

Link copied to clipboard

true when the sender sent bytes, false when it sent text.

Link copied to clipboard

true when the frame was retransmitted until delivered and kept in order, false when it was sent fire-and-forget.

Link copied to clipboard

ID of the participant that sent the frame.

Link copied to clipboard
val text: String?

The text payload, or null when isBinary is true.

Link copied to clipboard

Receive time in epoch milliseconds, stamped on this device. The sender attaches no timestamp, so this is not comparable across participants' clocks.

Functions

Link copied to clipboard
open override fun toString(): String