UDP "readinto" nonblocking fails to raise error #12618
Unanswered
ctimmer
asked this question in
Core Development
Replies: 3 comments 1 reply
-
yeah I think this has the same underlying root issue as #736 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Verified the same issue occurs on: Curt |
Beta Was this translation helpful? Give feedback.
0 replies
-
The
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It appears that under certain conditions "readinto" will return the same (last) record repeatedly.
Tested with RPI_PICO_W-20230426-v1.20.0.uf2
The basic server logic is (full code at the end):
poll input, when a UDP message is available
execute reads until there are no more messages, queuing results
process message(s) from the queue to update a display
repeat
Test results
"recvfrom" (test below) worked as expected.
"readinto" continuously returned the same (only) message and was only stopped when the queue was full. The next poll/read cycle did not return this message. Setting buffer_length to zero before the "readinto" and testing it after did not work around this problem, buffer_length was still set as if a new message was read.
recvfrom (1 input message) :
Code:
recvfrom print output:
readinto (1 input message) :
Code:
readinto print output:
Full code:
Beta Was this translation helpful? Give feedback.
All reactions