Skip to content

Fix fragmented TCP response framing - #22

Merged
FLo-ABB merged 1 commit into
FLo-ABB:mainfrom
Christiansalles:fix/tcp-response-framing
Sep 14, 2026
Merged

FLo-ABB merged 1 commit into
FLo-ABB:mainfrom
Christiansalles:fix/tcp-response-framing

Conversation

@Christiansalles

Copy link
Copy Markdown
Contributor

Summary

  • buffer TCP bytes until complete CRLF-terminated response lines are available
  • preserve coalesced response bytes and parse the complete GV, GF, GJ, GI, and SE response shapes
  • frame the welcome and login prompts even when TCP splits or coalesces them
  • apply one 30-second deadline per response and invalidate sockets after timeout, partial EOF, malformed data, oversized buffers, or unexpected pending bytes
  • keep the existing public function and command method signatures unchanged

Fixes #8.

Scope

This change covers login and line-oriented command responses. The bulk image, file, job, and settings transfer parser is intentionally not redesigned here because that work is already being discussed in #11.

Tests

  • python -m unittest discover -s tests -v — 23 tests passed
  • python -m compileall -q src tests — passed
  • git diff --check — passed
  • python -m build — source distribution and wheel built successfully
  • installed-wheel smoke test with a fragmented GV response — passed

@FLo-ABB
FLo-ABB merged commit 2ad1155 into FLo-ABB:main Sep 14, 2026
1 check failed
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.

utils reiceive data

2 participants