-
-
Notifications
You must be signed in to change notification settings - Fork 3k
std: Decouple network streams from fs.File #7124
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
Conversation
Since it's separated we can call The connection might still not be established if the connection is non-blocking however, and so calling |
I'd also consider adding functions to |
I think having a separate
There are a few options that deserve getters/setters: I think we can start a new ticket to brainstorm what's needed in the |
Agree... |
Is Windows and/or Azure being a bunch of hot garbage again? Or did I mess up the version check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support this change, let's just make sure it's CI green
The overlap between files and sockets is minimal and lumping them together means supporting only a small subset of the functionalities provided by the OS. Moreover the socket and file handles are not always interchangeable: on Windows one should use Winsock's close() call rather than the one used for common files.
Avoid errors if the socket enters the TIME_WAIT state and we need to re-execute this test before the OS releases it. This problem was not really a problem before since the accept()-ed socket was never closed on the server-side.
Starting from Windows 10 build 17063.
The overlap between files and sockets is minimal and lumping them
together means supporting only a small subset of the functionalities
provided by the OS.
Moreover the socket and file handles are not always interchangeable: on
Windows one should use Winsock's close() call rather than the one used
for common files.