diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-09  Tim Watson  <watson.timothy@gmail.com>  0.4.1.0
+
+* foreigns htonl, ntohl, htons, ntohs are imported from ws2_32 on windows 
+* Created Data instance for EndPointAddress (thanks Andrew Rademacher)
+
 2014-05-30  Tim Watson  <watson.timothy@gmail.com>  0.4.0.0
 
 * Fix build for GHC 7.4 - thanks mboes!
diff --git a/network-transport.cabal b/network-transport.cabal
--- a/network-transport.cabal
+++ b/network-transport.cabal
@@ -1,5 +1,5 @@
 Name:          network-transport
-Version:       0.4.0.0
+Version:       0.4.1.0
 Cabal-Version: >=1.6
 Build-Type:    Simple
 License:       BSD3 
@@ -82,3 +82,5 @@
                    CPP
   GHC-Options:     -Wall -fno-warn-unused-do-bind
   HS-Source-Dirs:  src
+  if os(win32)
+      extra-libraries: ws2_32
diff --git a/src/Network/Transport.hs b/src/Network/Transport.hs
--- a/src/Network/Transport.hs
+++ b/src/Network/Transport.hs
@@ -32,6 +32,7 @@
 import Data.Binary (Binary(put, get), putWord8, getWord8)
 import Data.Hashable
 import Data.Word (Word64)
+import Data.Data (Data)
 
 --------------------------------------------------------------------------------
 -- Main API                                                                   --
@@ -140,7 +141,7 @@
 
 -- | EndPointAddress of an endpoint.
 newtype EndPointAddress = EndPointAddress { endPointAddressToByteString :: ByteString }
-  deriving (Eq, Ord, Typeable, Hashable)
+  deriving (Eq, Ord, Typeable, Data, Hashable)
 
 instance Binary EndPointAddress where
   put = put . endPointAddressToByteString
diff --git a/src/Network/Transport/Internal.hs b/src/Network/Transport/Internal.hs
--- a/src/Network/Transport/Internal.hs
+++ b/src/Network/Transport/Internal.hs
@@ -51,10 +51,21 @@
 import System.Timeout (timeout)
 --import Control.Concurrent (myThreadId)
 
+#ifdef mingw32_HOST_OS
+
+foreign import stdcall unsafe "htonl" htonl :: CInt -> CInt
+foreign import stdcall unsafe "ntohl" ntohl :: CInt -> CInt
+foreign import stdcall unsafe "htons" htons :: CShort -> CShort
+foreign import stdcall unsafe "ntohs" ntohs :: CShort -> CShort
+
+#else
+
 foreign import ccall unsafe "htonl" htonl :: CInt -> CInt
 foreign import ccall unsafe "ntohl" ntohl :: CInt -> CInt
 foreign import ccall unsafe "htons" htons :: CShort -> CShort
 foreign import ccall unsafe "ntohs" ntohs :: CShort -> CShort
+
+#endif
 
 -- | Serialize 32-bit to network byte order
 encodeInt32 :: Enum a => a -> ByteString
