withSocketsDo
On Windows operating systems, the networking subsystem has to be initialised using withSocketsDo before any networking operations can be used. eg.
> main = withSocketsDo $ do {...}
Although this is only strictly necessary on Windows platforms, it is harmless on other platforms, so for portability it is good practice to use it all the time.