Server helper: Suppress error of UDPServer over max_bytes on Windows #4131
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.
Which issue(s) this PR fixes:
None.
This fixes the problem revealed in the following PR.
What this PR does / why we need it:
This PR just suppresses error message of UDPServer over max_bytes on Windows.
Suppressed error message on Windows:
(Please see #4117 (comment) for details)
New info message on Windows:
On Windows,
UDPSocket::recv
andUDPSocket::recvfrom
can raiseErrno::EMSGSIZE
error when the receiving data size is larger than themaxlen
, the value specified as the method's argument.(On non-Windows, this error doesn't happen, and we can receive data that is cut off to the specified size.)
On Windows, we can't cut data off the same way as Non-Windows.
So the data is simply ignored on Windows.
It is not a big problem since cutting data off usually causes a failure of parsing and the data is eventually ignored.
We want information about what data is ignored, but it is difficult to know it.
That is an issue for the future.
Ref
winsock
specificationDocs Changes:
TODO. We should add a document about this Windows specification.
Release Note:
Same as the title.