-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
TcpStream::set_nonblocking
docs mention non-existent methods
#129903
Comments
It is likely referring to the underlying syscalls on UNIX systems. |
BSD socket APIs are defined in POSIX, also referenced and extended in various IETF RFCs. Windows also adopted it. So it's pretty much the universal API describing how to interact with various kinds of network sockets. But at least |
Oh I see. Thank you for helping with my confusion. I'm happy to close this then (but also fine with keeping it open if it seems worth clarifying this in docs). |
do we just have to add comments to clarfiy better or is there any docs file that we have to change too? |
…=Mark-Simulacrum Clarifications for set_nonblocking methods Closes rust-lang#129903. The issue mentions that `send`, `recv` and other operations are interpreted by some users as methods of `TcpSocket` which led to confusion since it hasn't them. To fix it I added "system" into the documentation as being more precise for two reasons: * it's makes it clear that these names are system operations; * it doesn't point to the location of these methods like `libc` because not every system is POSIX compatible.
Rollup merge of rust-lang#130743 - YohDeadfall:net-nonblocking-doc, r=Mark-Simulacrum Clarifications for set_nonblocking methods Closes rust-lang#129903. The issue mentions that `send`, `recv` and other operations are interpreted by some users as methods of `TcpSocket` which led to confusion since it hasn't them. To fix it I added "system" into the documentation as being more precise for two reasons: * it's makes it clear that these names are system operations; * it doesn't point to the location of these methods like `libc` because not every system is POSIX compatible.
Location
rust/library/std/src/net/tcp.rs
Line 564 in a460185
Summary
The docs mention:
However, I can't find any
recv
orsend
methods onTcpStream
(nor in the traits it implements). Do these operations refer to something else?The text was updated successfully, but these errors were encountered: