Documentation
¶
Index ¶
Constants ¶
View Source
const ( MsgNewSession byte = 0x01 MsgAttach byte = 0x02 MsgDetach byte = 0x03 MsgInput byte = 0x04 MsgResize byte = 0x05 MsgNewWindow byte = 0x06 MsgCloseWindow byte = 0x09 MsgSelectWin byte = 0x0A MsgList byte = 0x0B MsgKillSession byte = 0x0C MsgPaste byte = 0x13 MsgHUD byte = 0x14 MsgAdminPanel byte = 0x15 // client → server: open/close admin panel MsgAdminAction byte = 0x16 // client → server: toggle/kick action MsgEnableSSH byte = 0x17 // client → server: start SSH listener (payload: addr) MsgEnableWeb byte = 0x18 // client → server: start web listener (payload: addr) MsgScrollMode byte = 0x19 // client → server: enter/exit scroll mode (payload: [0/1]) MsgScrollAction byte = 0x1A // client → server: scroll action (payload: [action]) MsgSendInput byte = 0x1B // client → server: inject input (payload: "session\x00text") MsgReadScreen byte = 0x1C // client → server: read screen (payload: session name) )
Message types: client → server
View Source
const ( MsgOutput byte = 0x80 MsgSessionList byte = 0x81 MsgError byte = 0x82 MsgDetached byte = 0x83 MsgSessionDead byte = 0x84 MsgAdminState byte = 0x85 // server → client: admin panel state MsgScreenData byte = 0x86 // server → client: plain text screen content )
Message types: server → client
View Source
const ( WindowNext byte = 0xFF WindowPrev byte = 0xFE )
Window select special values
Variables ¶
This section is empty.
Functions ¶
func DecodeResize ¶
DecodeResize decodes cols and rows from 4 bytes.
func Encode ¶
Encode writes a message: [type][2-byte big-endian length][payload]. Each call makes exactly one Write call containing the complete message. Bridge adapters (sshBridge, wsBridge) depend on this invariant.
func EncodeResize ¶
EncodeResize encodes cols and rows as 4 bytes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.