]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/socket_private.h
Prepare for assimilating msphttp
[libs/net.git] / source / net / socket_private.h
diff --git a/source/net/socket_private.h b/source/net/socket_private.h
new file mode 100644 (file)
index 0000000..83cc369
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MSP_NET_SOCKET_PRIVATE_H_
+#define MSP_NET_SOCKET_PRIVATE_H_
+
+#include <msp/io/handle.h>
+#include "socket.h"
+
+namespace Msp {
+namespace Net {
+
+struct Socket::Private
+{
+#ifdef WIN32
+       SOCKET handle;
+#else
+       int handle;
+#endif
+
+       /* On POSIX platforms this is the same as the handle.  This might seem
+       strange but it allows the same syntax on both POSIX and Windows. */
+       IO::Handle event;
+};
+
+} // namespace Net
+} // namespace Msp
+
+#endif