Removed duplicate socket initialization and corrected timeout values.

I don't have any significant experience with sockets on Linux/Mac, so it's entirely possible that I'm overlooking a valid reason why the code is correct as is. If that's the case, I think a couple comments explaining why would be warranted.
Regarding line 164, 167, 171: Windows expects the SO_RCVTIMEO to be in milliseconds, while for OS X/linux it accepts Microseconds. Ideally we wanted a SO_RCVTIMEO of 500 Microseconds, which we can do in OS X/linux, but not Windows with the current configuration. That is why windows is set to 1 Millisecond- the closest we could get.

You're right, this could use a comment explaining why this was written in this way.