-
Notifications
You must be signed in to change notification settings - Fork 13.3k
On windows, initialize IO types (for example, sockets) with WSA_FLAG_OVERLAPPED #24206
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
Comments
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 8, 2015
This commit modifies the socket creation functions on windows to always specify the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The overlapped flag enables IOCP APIs on Windows to be used with the socket at no cost, enabling better interoperation with external libraries. The no handle inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for all handles. Closes rust-lang#24206
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 14, 2015
This commit modifies the socket creation functions on windows to always specify the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The overlapped flag enables IOCP APIs on Windows to be used with the socket at no cost, enabling better interoperation with external libraries. The no handle inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for all handles. Closes rust-lang#24206
bors
added a commit
that referenced
this issue
Apr 15, 2015
…uron This commit modifies the socket creation functions on windows to always specify the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The overlapped flag enables IOCP APIs on Windows to be used with the socket at no cost, enabling better interoperation with external libraries. The no handle inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for all handles. Closes #24206
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per the docs: https://msdn.microsoft.com/en-us/library/windows/desktop/ms742212%28v=vs.85%29.aspx
If I understand correctly, this flag must be set at initialization time of the socket (and other types), does not have a cost, and enables the socket to be used in overlap mode w/ completion ports.
Doing this will be helpful for when I add windows support to mio.
cc @alexcrichton
The text was updated successfully, but these errors were encountered: