Adding Windows Compatibility

TODO: Check other OSes compatibility after adding necessary cast for setsockopt for Windows