OptionalconnectionConnection identifier for tunnel messages. See
RelayMessageType.Tunnel.
OptionaldataApplication payload. Control-message payloads must be JSON-serializable; tunnel data uses a Buffer.
OptionalfromID of the client that authored the message. Set by the server for inbound messages and by the client for outbound ones.
OptionaltoID of the destination client. When omitted on a data message the
server will broadcast it to every other connected client. Ignored for
broadcast, join, leave, welcome and error messages.
The kind of message.
A message exchanged between the relay server and its clients.
Messages use a versioned, length-prefixed hybrid wire format. Control messages use JSON, while tunnel data carries raw bytes.