changeset 69:c9ebb8ea24e2

Improve portability
author Thomas Sanchez <>
date Wed, 31 Mar 2010 00:00:46 +0200
parents 121031d807aa
children dda89f1d48c6
files include/network/IEndPoint.hpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/include/network/IEndPoint.hpp	Tue Mar 30 23:26:14 2010 +0200
+++ b/include/network/IEndPoint.hpp	Wed Mar 31 00:00:46 2010 +0200
@@ -3,6 +3,10 @@
 
 # include <string>
 
+# if WIN32
+#  include <winsock2.h>
+# endif
+
 namespace   zia
 {
     namespace   api
@@ -18,7 +22,11 @@
             public:
                 typedef int             Ip;
                 typedef unsigned short  Port;
+# if WIN32
+                typedef SOCKET          Socket;
+# else
                 typedef int             Socket;
+# endif
                 typedef std::string     IAddress;
 
                 virtual ~IEndPoint(void){}