Socket functionality for WindowsPoller

Current state of the Windows port: all tests in common/ pass
Can we have some curly brackets please. The next line can then become an else if.