]> git.tdb.fi Git - libs/net.git/blob - source/socket_private.h
Hide platform details of Socket behind pimpl
[libs/net.git] / source / socket_private.h
1 #ifndef MSP_NET_SOCKET_PRIVATE_H_
2 #define MSP_NET_SOCKET_PRIVATE_H_
3
4 #include <msp/io/handle.h>
5 #include "socket.h"
6
7 namespace Msp {
8 namespace Net {
9
10 struct Socket::Private
11 {
12 #ifdef WIN32
13         SOCKET handle;
14 #else
15         int handle;
16 #endif
17
18         /* On POSIX platforms this is the same as the handle.  This might seem
19         strange but it allows the same syntax on both POSIX and Windows. */
20         IO::Handle event;
21 };
22
23 } // namespace Net
24 } // namespace Msp
25
26 #endif