pub enum MessagePayload {
Show 17 variants
InputData {
data: Vec<u8>,
paste: bool,
},
OutputData {
data: Vec<u8>,
},
Resize {
columns: u16,
rows: u16,
},
Sealed {
data: Vec<u8>,
},
AuthToken {
token: String,
protocol: u16,
},
SessionCreated {
session_id: SessionId,
frontend_token: String,
resume_secret: Option<String>,
protocol: u16,
},
ResumeSecret {
secret: String,
},
SessionOptions {
replay: bool,
},
Frontend {
frontend: u64,
history: u32,
rows: u16,
},
JoinOptions {
history: u32,
rows: u16,
},
ReplayData {
frontend: u64,
data: Vec<u8>,
},
MachineId {
machine: String,
protocol: u16,
},
Challenge {
nonce: Vec<u8>,
protocol: u16,
},
Signature {
signature: Vec<u8>,
},
Record {
sealed_name: Vec<u8>,
sealed_key: Vec<u8>,
signature: Vec<u8>,
},
RecordsKept {
channels: Vec<String>,
previous: Vec<SessionId>,
},
ErrorReason {
reason: String,
},
}Expand description
Type-specific payload for a Message.
Externally tagged on the wire: an object with one key, the variant name,
e.g. {"Resize":{"columns":80,"rows":24}}.
Variants§
InputData
Keyboard/mouse input data, sealed end to end (bytes, a JSON array of
numbers). paste marks input inside a bracketed paste, sealed as
such: left out when false.
OutputData
Terminal stdout/stderr output, sealed end to end (bytes, a JSON array of numbers).
Resize
Terminal resize dimensions, in clear. Backend and frontend send a
size sealed, as Sealed, instead.
Sealed
Sealed end to end, carried by resize: the relay forwards it, and
cannot read it (bytes, a JSON array of numbers).
AuthToken
Token for authentication, carried by auth.
Fields
SessionCreated
Session ID and frontend token, carried by session_joined. To the
backend that created or resumed the session it also carries the
resume secret, which frontends never see.
Fields
ResumeSecret
The session’s resume secret, carried by session_resume.
SessionOptions
What the backend does, carried by session_create: with replay,
it answers each frontend_joined with a replay.
Frontend
Which frontend joined, carried by frontend_joined. The number is
the relay’s, only meaningful within the session.
Fields
JoinOptions
What a frontend asks with its join, carried by session_join (#92):
lines of the session’s history before its screen (0 for none, as a
frontend older than this asks; a frontend joining again asks none).
Fields
ReplayData
The recent output for one joining frontend, carried by replay,
sealed end to end (bytes, a JSON array of numbers).
MachineId
Which registered machine says hello, carried by machine_hello.
Fields
Challenge
Bytes for a machine to sign, carried by challenge.
Signature
A machine’s signature of its challenge, carried by machine_proof.
Record
A session’s name and key, sealed to the account, carried by
session_record.
Fields
RecordsKept
The channels of the sessions a machine runs, carried by
session_records_kept (#134).
Fields
ErrorReason
Error reason from the relay.