-
Notifications
You must be signed in to change notification settings - Fork 739
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
Document that UdpSocket::recv and recv_from do not read from the buffer #657
Labels
Comments
And add to the docs, if recv returns with Ok(N), the following code must not iterate over complete array, but iterate over a slice of the array buf[0,..,N-1]. |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Sep 15, 2017
rustdoc: extend UdpSocket API doc (rust-lang#657) see tokio-rs/mio#657
can be closed? |
I don't think so. The docs in mio still need some work. |
frehberg
added a commit
to frehberg/mio
that referenced
this issue
Dec 6, 2017
Finally the patch has been rebased, and could be merged |
carllerche
pushed a commit
that referenced
this issue
Dec 15, 2017
The original PR got messed up somehow. I moved the commit to #775. |
frehberg
added a commit
to frehberg/mio
that referenced
this issue
Dec 22, 2017
carllerche
pushed a commit
that referenced
this issue
Jan 4, 2018
Thanks. This has been merged (f6f293f). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is important for these to document that they only write to the buffer, not read from it, because that means it is safe to pass an uninitialized buffer. It would be wasteful to construct a buffer, initialize it to contain all 0 bytes, and pass it to UdpSocket.
The text was updated successfully, but these errors were encountered: