Expand description
Protocol definitions for client-server communication
The protocol uses two channels:
- Data channel: Raw bytes, no framing (stdin→server, server→stdout)
- Control channel: JSON messages for out-of-band communication
Structs§
- Client
Hello - Client hello message sent during handshake
- File
Request - A file to open with optional line/column position, range, and hover message
- Server
Hello - Server hello message sent in response to ClientHello
- Term
Size - Terminal size in columns and rows
- Version
Mismatch - Version mismatch error response
Enums§
- Client
Control - Control messages from client to server
- Control
Message - Wrapper for control channel messages (used for JSON serialization)
- Server
Control - Control messages from server to client
Constants§
- PROTOCOL_
VERSION - Protocol version - must match between client and server
Functions§
- read_
control_ message - Read a JSON control message from a reader
- write_
control_ message - Write a JSON control message to a writer