CXX-11 refactor to use timeout instead of shutdown pipe
CXX-11 only include unix socket headers if we are not on windows