Skip to main content

Module base_protocol

Module base_protocol 

Source
Expand description

Fully compliant LSP Base 0.9 JSON-RPC message envelope handling, HTTP-style header parsing, and boundary checks.

Enums§

ParseError
Errors that can occur when processing an LSP message.

Constants§

MAX_CONTENT_LENGTH
Maximum allowed value for the Content-Length header (50 MB).
MAX_HEADERS_SIZE
Maximum allowed buffer size for HTTP headers before terminating with \r\n\r\n (8 KB).

Functions§

decode_message
Decodes an LSP message from the input buffer.
encode_message
Encodes a message into the output buffer with Content-Length header.
validate_envelope
Validates a raw JSON value as a conforming JSON-RPC 2.0 envelope.