Replies: 1 comment
-
Isn't the amount received by |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi All,
When using socket.recv(bufsize) on a client socket (returned from a server socket.accept() call), it never reads more than 833 string characters, regardless of how large I specify the bufsize.
The client is a HTTP request coming in, to ask for serving a web page, and then (in my case) the request holds POST data.
It makes no difference what size I specify 1024, 2048, or more bytes, it always returns with a maximum of 833 string characters.
It does limit the buffer when I pick a small number, but it won't exceed that 833 characters in one read...
I then thus to do two consecutive clientSocket.recv() calls to get the complete data.
I'm pondering why this is happening and can't figure it out.
I've tried if timing is perhaps involved, e.g. between accepting the client and reading its socket, but that makes no difference.
I've also tried blocking/non-blocking settings for the socket (both server socket and derived client sockets).
It almost seems as if there's a maximum limit elsewhere set which my recv(bufsize) can't exceed. Perhaps hardware-related?
This because when I set the bufsize very small, it does stop at that limit, just not when I set it larger (than 833 string characters).
I've confirmed via browser tools that the post data is send completely in one message, so nothing strange on the calling side.
Thanks for your considerations!
Running MicroPython v1.26.0 on 2025-08-09; Raspberry Pi Pico W with RP2040
Beta Was this translation helpful? Give feedback.
All reactions