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.
Hello again, here my 3nd pull request for the same changes. This time on the master branch as requested by @swells.
Neither the release 9.0.0 not the latest branch worked for me on Windows 10. I started investigating and finally found a fix, along with some other minor fixes (see commit messages).
The main issue I discovered was the following. When a child process is created, it fails to duplicate the socket with the incoming request.
This throws a 10038 socket error.
The reason is that the function WSADuplicateSocket is called in the child process but according to its doc
it must be called from the parent process.
This sample shows how to do it correctly. They used named pipes to transfer the socket infos to the child process. This is not very elegant as this could cause conflicts with the pipe name. So I used STDIN to communicate from parent to child, as is explained here.
It seems Windows 10 is more strict about socket duplication as it works on older Windows systems.
I tested my code on a Windows 7 PC and it worked there too.