#[non_exhaustive]pub enum MessageType {
Show 22 variants
SessionCreate,
SessionJoin,
SessionJoined,
SessionLeft,
SessionError,
Input,
Output,
Resize,
Ping,
Pong,
Auth,
SessionResume,
BackendAway,
BackendBack,
FrontendJoined,
Replay,
MachineHello,
Challenge,
MachineProof,
SessionRecord,
SessionRecordGone,
SessionRecordsKept,
}Expand description
All message type identifiers known to the protocol.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SessionCreate
Backend registers a new session with the relay.
SessionJoin
Frontend requests to join an existing session.
SessionJoined
Relay confirms a frontend or backend has been attached to a session.
SessionLeft
Either side detaches from a session.
SessionError
Relay reports an error during session lifecycle.
Input
Keyboard/mouse input from frontend to backend.
Output
Terminal output from backend to frontend.
Resize
Terminal size change notification.
Ping
Keep-alive heartbeat (either direction).
Pong
Heartbeat response.
Auth
First message on a connection: carries the token (AuthToken payload).
SessionResume
Backend reattaches to its session after a dropped connection.
BackendAway
Relay tells frontends their session’s backend dropped.
BackendBack
Relay tells frontends their session’s backend is back.
FrontendJoined
Relay tells the backend a frontend joined and waits for its replay.
Replay
Backend sends a joining frontend the recent output, before live output.
MachineHello
A registered machine’s first message on /backend: which machine it
is (MachineId payload), to be challenged (#86).
Challenge
The relay’s challenge to a machine (Challenge payload): fresh bytes
for it to sign.
MachineProof
A machine’s answer to the challenge (Signature payload): its
signature, by the key it registered.
SessionRecord
A registered machine stores one of its sessions on the relay (#87):
on the message’s channel, its name and key sealed to the account
(Record payload).
SessionRecordGone
A registered machine’s session on the message’s channel ended: its record goes.
SessionRecordsKept
A registered machine’s link says which of its sessions run (#134,
RecordsKept payload), once each relay session has told them all:
the records its relay sessions (this one and those it held before)
keep of any other go.