]> git.tdb.fi Git - libs/net.git/blob - source/types.h
Fix a comparison operator on win32
[libs/net.git] / source / types.h
1 /* $Id$
2
3 This file is part of libmspnet
4 Copyright © 2008  Mikkosoft Productions, Mikko Rasa
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_NET_TYPES_H_
9 #define MSP_NET_TYPES_H_
10
11 namespace Msp {
12 namespace Net {
13
14 #ifdef WIN32
15 typedef SOCKET SocketHandle;
16 typedef int socklen_t;
17
18 #define MSP_NET_INVALID_SOCKET_HANDLE static_cast<SOCKET>(-1)
19 #else
20 typedef IO::Handle SocketHandle;
21
22 #define MSP_NET_INVALID_SOCKET_HANDLE MSP_IO_INVALID_HANDLE
23 #endif
24
25 } // namespace Net
26 } // namespace Msp
27
28 #endif