diff options
Diffstat (limited to 'src/win32_compatibility.h')
-rw-r--r-- | src/win32_compatibility.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/win32_compatibility.h b/src/win32_compatibility.h index 72cb4f7..2fe740a 100644 --- a/src/win32_compatibility.h +++ b/src/win32_compatibility.h | |||
@@ -24,7 +24,8 @@ extern "C" | |||
24 | } | 24 | } |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include "fstring.h" | 27 | #include "bu/fstring.h" |
28 | #include "bu/singleton.h" | ||
28 | 29 | ||
29 | #ifndef TEMP_FAILURE_RETRY | 30 | #ifndef TEMP_FAILURE_RETRY |
30 | #define TEMP_FAILURE_RETRY(expression) \ | 31 | #define TEMP_FAILURE_RETRY(expression) \ |
@@ -65,6 +66,18 @@ namespace DynamicWinsock2 | |||
65 | int recv( SOCKET s, char *buf, int len, int flags ); | 66 | int recv( SOCKET s, char *buf, int len, int flags ); |
66 | int send( SOCKET s, const char *buf, int len, int flags ); | 67 | int send( SOCKET s, const char *buf, int len, int flags ); |
67 | int DYN_FD_ISSET(SOCKET s, fd_set *set); | 68 | int DYN_FD_ISSET(SOCKET s, fd_set *set); |
69 | |||
70 | class Winsock2 : public Bu::Singleton<Winsock2> | ||
71 | { | ||
72 | friend class Bu::Singleton<Winsock2>; | ||
73 | private: | ||
74 | Winsock2(); | ||
75 | virtual ~Winsock2(); | ||
76 | |||
77 | WSADATA wsaData; | ||
78 | |||
79 | public: | ||
80 | } | ||
68 | }; | 81 | }; |
69 | 82 | ||
70 | #endif /* WIN32 */ | 83 | #endif /* WIN32 */ |