Skip to content

Receive complete OSC UDP datagrams larger than 8192 bytes - #196

Open
Meowthos503 wants to merge 1 commit into
attwad:mainfrom
Meowthos503:fix/complete-udp-datagrams
Open

Meowthos503 wants to merge 1 commit into
attwad:mainfrom
Meowthos503:fix/complete-udp-datagrams

Conversation

@Meowthos503

Copy link
Copy Markdown

The synchronous OSC UDP servers inherit socketserver.UDPServer's 8,192-byte receive limit. A valid larger OSC message or bundle is truncated before it reaches the dispatcher, so its callback can be silently skipped.

Set the shared OSCUDPServer receive limit to 65,535 bytes, sufficient for complete standard UDP datagrams. Blocking, threading and forking servers inherit the fix. The regression models recvfrom truncation and checks complete reception and callback delivery for a 9,000-byte blob both directly and inside a bundle.

This addresses a reproducible large-packet failure that may explain reports such as #190; the reporter's exact VMC traffic was not available for verification.

Validation on Python 3.12.14:

  • Before the fix, both new regression subcases fail because reception stops at 8,192 bytes. Afterward the complete datagram and blob reach the callback.
  • Full suite: 181 passed, 2 subtests passed.
  • Actual IPv4 loopback UDP checks: 12 comparisons covering message/bundle packets with 32-, 9,000- and 65,460-byte blobs. The old limit preserves small packets but truncates larger ones; the fix preserves all bytes and callback payloads, including datagrams near the IPv4 UDP payload limit.
  • Independent review: 37 additional real IPv4 loopback checks pass, covering blocking, threading and forking handler paths, boundary-sized packets, responses and existing custom receive limits.
  • Ruff lint/format, mypy, repository pre-commit hooks, and built-wheel import/type checks pass. Local workflow checks used Python 3.12; the Python 3.10/3.11 CI matrix was not run locally.

AI-assisted implementation and independent AI review, submitted through the Meowthos503 account. The reported checks were executed locally.

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.

1 participant