shutdown that supports SHUT_RD or SHUT_WR or SHUT_RDWR
Socket::close can call shutdown when it argument is true. However, shutdown is always called using SHUT_RDWR where both send and receive channels are closed (in fact, reset). When you do such kind of shutdown in a http connection, the other side (browser) may report this situation as an error and some data may be lost (if RST is sent together data). It would be better to shutdown using only SHUT_WR (closing only your side) or give the option to the user by argument.
How about adding a shutdown method, with support for SHUT_RD , SHUT_WR and SHUT_RDWR, like in any other BSD socket stack ? Or to change close() to support these three shutdown options.
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
No answer or evaluation .... #worried