Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate recv not reading everything as the Nim Docs say it should. #46

Open
treeform opened this issue Apr 5, 2023 · 0 comments
Open

Comments

@treeform
Copy link
Owner

treeform commented Apr 5, 2023

https://github.com/treeform/ws/blob/master/src/ws.nim#L393

"For buffered sockets this function will attempt to read all the requested data. It will read this data in BufferSize chunks."

https://nim-lang.org/docs/asyncnet.html#recv%2CAsyncSocket%2Cint

But it looks like the Nim docs are wrong and there is a loop to read everything:

https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/asyncnet.nim#L412-L419

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

No branches or pull requests

1 participant