Expand description
JSONL and LSP Content-Length framing on one stream.
Enums§
- Frame
Error - A framing read that cannot produce a body.
- Framing
- How the peer framed the last message. Replies use the same style.
Constants§
- MAX_
HEADER_ LINES - Hard cap on LSP header lines.
- MAX_
MESSAGE_ BYTES - Hard cap on one JSON-RPC body.
Functions§
- classify_
first_ line - Classify the first line the way
read_messagedoes. - is_
header_ line - First-line rule:
^[A-Za-z][A-Za-z0-9-]*:is headers. Anything else, including a non-{JSONL body, is JSONL. - read_
message - Read one framed body. The returned
Framingis what the reply must use. - write_
message - Write
payloadusingframing. Does not append a second newline to JSON.