#[repr(u8)]pub enum MsgKind {
Hello = 1,
HelloAck = 2,
Input = 3,
Output = 4,
Resize = 5,
ResizeAck = 6,
Exit = 10,
Shutdown = 11,
Ping = 12,
Pong = 13,
Error = 127,
}Expand description
Message types in the keepty protocol.
Variants§
Hello = 1
Client handshake. Payload: [role: u8, cols: u16 BE, rows: u16 BE]
HelloAck = 2
Broker acknowledgement. Payload: [pty_pid: u32 BE, cols: u16 BE, rows: u16 BE]
Input = 3
Raw keystroke data from client to PTY. Payload: raw bytes.
Output = 4
Raw PTY output bytes broadcast to all clients. Payload: raw bytes.
Resize = 5
Terminal resize. Payload: [cols: u16 BE, rows: u16 BE]
ResizeAck = 6
Broker acknowledgement of resize. Payload: [resize_gen: u32 BE, cols: u16 BE, rows: u16 BE] Broadcast to all clients after the broker applies the resize to the PTY. Acts as an in-band fence: output before this was old geometry.
Exit = 10
Process exit. Payload: [exit_code: i32 BE]
Shutdown = 11
Request graceful shutdown.
Ping = 12
Connection keepalive (client -> broker).
Pong = 13
Keepalive response (broker -> client).
Error = 127
Error message. Payload: UTF-8 error string.