Repository navigation
Support Unix.socketpair using PF_UNIX on Windows and OCaml 4.14 - #870
Merged
Merged
Conversation
Collaborator
|
Hi, Thanks for the contribution. IIUC, this won't be effective until OCaml4.14 is released (or until someone installs it within a custom opam switch or something along those lines). I'm tempted to withhold merging until 4.14 is released or is about to be released. It might be a bit long though. In the meantime, I'll try to get someone with more C and system-programming chops to do the review. |
Contributor
Author
|
I'm tempted to withhold merging until 4.14 is released or is about to be
released. It might be a bit long though.
Completely understandable, but please consider cherry-picking the first two
commits. The first one is a bug-fix, and the second enables socketpair over
IPv6 (because why not).
Let's say I'll bump this PR when OCaml 4.14 alpha is released.
In the meantime, I'll try to get someone with more C and
system-programming chops to do the review.
Thank you!
… |
Collaborator
|
Ok, I'll cherry-pick those after the review. Thanks! |
Collaborator
Contributor
|
Looks good to me, too. |
Collaborator
|
Ok, I'll open a branch for cherry-picking the prefix of the PR. Thanks for the reviews! |
Merged
Collaborator
|
Done in #876 I simply cherry-picked the commits and added a changelog entry. I'll merge once the CI passes. |
MisterDA
force-pushed
the
socketpair-windows
branch
from
August 30, 2021 11:19
4409f7c to
fbd2900
Compare
Unix.socketpair using PF_UNIX on Windows and OCaml 4.14
Support for Unix domain sockets on Windows and a socketpair emulation using PF_UNIX was added in OCaml 4.14 in PR 10192.
MisterDA
force-pushed
the
socketpair-windows
branch
from
October 6, 2021 21:23
fbd2900 to
dad167f
Compare
smorimoto
approved these changes
Oct 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few improvements (imho) to the support of
socketpairunder Windows:socket_domain_tablelength;socketpairemulation (I'm rooting for the Universal Deployment of IPv6);socketpairemulation using Unix domain sockets to be introduced in OCaml 4.14 (PR 10192).This allows us to use socketpair and Unix domain sockets to perform IO redirection with processes, which isn't possible with current sockets in OCaml under Windows. Sockets have to be created in non-overlapped mode, with
WSASocket(domain, type, protocol, NULL, 0, 0)rather thansocket(domain, type, protocol)(overlapped). Unix domain sockets under Windows don't have this limitation.