Skip to main content

Module message

Module message 

Source
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§

BoundsParams
Parameters of bounds: nodes of the last snapshot, by id, whose bounds the agent reads again past the platform’s node cache.
FramesParams
Parameters of frames_start.
Hello
The agent’s first message on every connection.
ImageFormat
Image encodings.
InputAck
The result of an input method: whether the platform accepted the events.
KeyParams
Parameters of key.
Method
A request method, u16 on the wire.
NodeBounds
One node of a Probed, on the wire [node, bounds].
Ping
A liveness probe; the peer answers with a Pong carrying 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.
ResyncAck
The result of resync: the stream is in sync again from seq + 1.
ResyncParams
Parameters of resync.
Rotation
Display rotation, with Android’s Surface.ROTATION_* values.
Screenshot
The result of screenshot.
ScreenshotParams
Parameters of screenshot.
SnapshotParams
Parameters of snapshot. Absent fields take the agent’s defaults.
SwipeParams
Parameters of swipe: the pointer goes down at (x1, y1), moves along the line to (x2, y2) over duration_ms and lifts there, moving, so the content flings on.
TapParams
Parameters of tap: a long press when duration_ms is present.
TextAck
The result of text_set: which way the text went in.
TextMethod
How text is entered.
TextParams
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.
DecodeError
Why a payload could not be decoded.
Message
One message, the payload of one frame.
Reply
The result of a successful request.