Repository navigation
UDP: receive datagrams up to the IPv4 maximum, a larger one than the … - #428
Merged
Merged
Conversation
…2000-byte buffer ended all capture The UDP source received into a 2000-byte buffer. A larger datagram fails the receive with WSAEMSGSIZE, that exception is rethrown on the thread that reads all sources, an "Exception occurred" box is shown, and the program ends when it is closed. Log frameworks send larger datagrams routinely, log4net's UdpAppender sends an exception with its stack trace as a single datagram, so DebugView++ could not be used as a UDP log viewer. The buffer is now 65536 bytes, room for the largest UDP datagram over IPv4 (65507 bytes), so the receive can no longer fail this way. LogSourceUdpReaderReceivesLargeDatagrams sends datagrams of 100, 2000, 2001, 10000 and 65507 bytes to a UDP reader and expects all of them. With the old buffer it receives only the first two. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…2000-byte buffer ended all capture
The UDP source received into a 2000-byte buffer. A larger datagram fails the receive with WSAEMSGSIZE, that exception is rethrown on the thread that reads all sources, an "Exception occurred" box is shown, and the program ends when it is closed. Log frameworks send larger datagrams routinely, log4net's UdpAppender sends an exception with its stack trace as a single datagram, so DebugView++ could not be used as a UDP log viewer.
The buffer is now 65536 bytes, room for the largest UDP datagram over IPv4 (65507 bytes), so the receive can no longer fail this way.
LogSourceUdpReaderReceivesLargeDatagrams sends datagrams of 100, 2000, 2001, 10000 and 65507 bytes to a UDP reader and expects all of them. With the old buffer it receives only the first two.