Expand description
The message envelope (design D4): hello, welcome, request, response, event, ping and pong.
Every message except an event is a map keyed by small integers whose key 0
is the message kind (kind); an event is a positional array whose first
element is the kind.
Modules§
- kind
- Message kinds: key 0 of a map-shaped message, element 0 of an event.
Structs§
- Bounds
Params - Parameters of
bounds: nodes of the last snapshot, by id, whose bounds the agent reads again past the platform’s node cache. - Frames
Params - Parameters of
frames_start. - Hello
- The agent’s first message on every connection.
- Image
Format - Image encodings.
- Input
Ack - The result of an input method: whether the platform accepted the events.
- KeyParams
- Parameters of
key. - Method
- A request method,
u16on the wire. - Node
Bounds - One node of a
Probed, on the wire[node, bounds]. - Ping
- A liveness probe; the peer answers with a
Pongcarrying the same nonce. - Pong
- The answer to a
Ping. - Probed
- The result of
bounds: each node still on screen with its bounds as the app reports them now, in the request’s order; a node that is gone, or that the last snapshot did not hold, is left out. - Request
- A request from the host.
- Response
- The answer to one request.
- Resync
Ack - The result of
resync: the stream is in sync again fromseq + 1. - Resync
Params - Parameters of
resync. - Rotation
- Display rotation, with Android’s
Surface.ROTATION_*values. - Screenshot
- The result of
screenshot. - Screenshot
Params - Parameters of
screenshot. - Snapshot
Params - Parameters of
snapshot. Absent fields take the agent’s defaults. - Swipe
Params - Parameters of
swipe: the pointer goes down at(x1, y1), moves along the line to(x2, y2)overduration_msand lifts there, moving, so the content flings on. - TapParams
- Parameters of
tap: a long press whenduration_msis present. - TextAck
- The result of
text_set: which way the text went in. - Text
Method - How text is entered.
- Text
Params - Parameters of
text_set. - Welcome
- The host’s answer to a hello: the negotiated version and frame size, or the reason it refuses the connection before closing it.
Enums§
- Call
- A method with its parameters.
- Decode
Error - Why a payload could not be decoded.
- Message
- One message, the payload of one frame.
- Reply
- The result of a successful request.