#184 Review PR

This PR is created for initial reviewing of the changes of #184 because #184 includes many external changes and hard to review.
At the moment. Lots of awkward issues with external dependencies, or missing POSIX support (e.g. MSYS has no native socket support). This time consuming task should be moved to another PR.