Use the shadow.remote protocol for client communication
masterThe shadow.remote protocol uses simple EDN maps exchanged over websockets (with Transit encoding) or TCP. Every message must include an :op keyword.
Reserved Keywords
:op: (Required) Describes the purpose of the message.:to: A single number or a set of numbers. Specifies which client(s) the relay should forward the message to. If omitted, the relay interprets the message.:from: The ID of the client that originated the message (added automatically by the relay).:client-id: A valid relay client ID, used depending on the:opcontext.
Connection Lifecycle
- Connection: The relay sends
{:op :welcome :client-id id}to the client. - Handshake: The client must respond with a
:hellomessage containing:client-info. Failure to do so results in disconnection.
;; Example handshake response
{:op :hello :client-info {:foo 1}}