aboutsummaryrefslogtreecommitdiff
path: root/src/stable/tcpserversocket.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-08-28 17:42:54 +0000
committerMike Buland <eichlan@xagasoft.com>2012-08-28 17:42:54 +0000
commit411cdf39fc2b961a970a0ae91b9059614251247e (patch)
tree935afa56c11aef0fb769e63659970e7d033a99e8 /src/stable/tcpserversocket.h
parentfc5132d68ae9e6afdbd0b5a687ba81c88fc84826 (diff)
downloadlibbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.gz
libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.bz2
libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.xz
libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.zip
Loads of win32 compilation issues fixed. Most are fairly minor unsigned/signed
mismatches because of socket handles, but there were also some order-of-definition issues that were fixed in the FD_SETSIZE definition code. Fixed a few things that just never worked on windows, like Bu::Thread::yield().
Diffstat (limited to 'src/stable/tcpserversocket.h')
-rw-r--r--src/stable/tcpserversocket.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/stable/tcpserversocket.h b/src/stable/tcpserversocket.h
index 0f56bd6..9776668 100644
--- a/src/stable/tcpserversocket.h
+++ b/src/stable/tcpserversocket.h
@@ -37,9 +37,14 @@ namespace Bu
37 class TcpServerSocket 37 class TcpServerSocket
38 { 38 {
39 public: 39 public:
40#ifdef WIN32
41 typedef unsigned int socket_t;
42#else
43 typedef int socket_t;
44#endif
40 TcpServerSocket( int nPort, int nPoolSize=40 ); 45 TcpServerSocket( int nPort, int nPoolSize=40 );
41 TcpServerSocket( const String &sAddr, int nPort, int nPoolSize=40 ); 46 TcpServerSocket( const String &sAddr, int nPort, int nPoolSize=40 );
42 TcpServerSocket( int nSocket, bool bInit, int nPoolSize=40 ); 47 TcpServerSocket( socket_t nSocket, bool bInit, int nPoolSize=40 );
43 TcpServerSocket( const TcpServerSocket &rSrc ); 48 TcpServerSocket( const TcpServerSocket &rSrc );
44 virtual ~TcpServerSocket(); 49 virtual ~TcpServerSocket();
45 50
@@ -52,11 +57,7 @@ namespace Bu
52 void initServer( struct sockaddr_in &name, int nPoolSize ); 57 void initServer( struct sockaddr_in &name, int nPoolSize );
53 58
54 fd_set fdActive; 59 fd_set fdActive;
55#ifdef WIN32 60 socket_t nServer;
56 unsigned int nServer;
57#else
58 int nServer;
59#endif
60 int nPort; 61 int nPort;
61 }; 62 };
62} 63}