Skip to content

Decode SLIP packets across TCP stream boundaries - #203

Merged
attwad merged 1 commit into
attwad:mainfrom
civilwarinfrance:fix/slip-stream-boundaries
Nov 14, 2026
Merged

attwad merged 1 commit into
attwad:mainfrom
civilwarinfrance:fix/slip-stream-boundaries

Conversation

@civilwarinfrance

Copy link
Copy Markdown
Contributor

The SLIP stream decoder currently looks for two adjacent END bytes between packets. A valid stream with just one END between packets fails to decode, and splitting an encoded message across TCP reads can produce empty packets.

Scan individual END markers, skip empty frames, and keep incomplete packet bytes for the next read. Tests cover single-END streams, repeated delimiters, every two-part split and byte-by-byte delivery, including escaped END and ESC bytes.

All 201 tests pass locally, along with Ruff, mypy and the package build.

AI assistance: OpenAI Codex wrote and tested this patch.

@attwad
attwad merged commit b7c2494 into attwad:main Nov 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants