]>
Commit | Line | Data |
---|---|---|
51fe4b60 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/msw/private/gsockmsw.h |
51fe4b60 VZ |
3 | // Purpose: MSW-specific socket implementation |
4 | // Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin | |
5 | // Created: April 1997 | |
6 | // Copyright: (C) 1999-1997, Guilhem Lavaux | |
7 | // (C) 1999-2000, Guillermo Rodriguez Garcia | |
8 | // (C) 2008 Vadim Zeitlin | |
9 | // RCS_ID: $Id$ | |
526954c5 | 10 | // Licence: wxWindows licence |
51fe4b60 VZ |
11 | ///////////////////////////////////////////////////////////////////////////// |
12 | ||
904ec517 | 13 | |
2804f77d VZ |
14 | #ifndef _WX_MSW_GSOCKMSW_H_ |
15 | #define _WX_MSW_GSOCKMSW_H_ | |
904ec517 | 16 | |
4b4d23c7 | 17 | #include "wx/msw/wrapwin.h" |
c21b68f7 | 18 | |
9e07d399 RN |
19 | #if defined(__CYGWIN__) |
20 | //CYGWIN gives annoying warning about runtime stuff if we don't do this | |
21 | # define USE_SYS_TYPES_FD_SET | |
22 | # include <sys/types.h> | |
23 | #endif | |
24 | ||
25 | #if defined(__WXWINCE__) || defined(__CYGWIN__) | |
51fe4b60 | 26 | #include <winsock.h> |
dbfb61b3 JS |
27 | #endif |
28 | ||
51fe4b60 VZ |
29 | // ---------------------------------------------------------------------------- |
30 | // MSW-specific socket implementation | |
31 | // ---------------------------------------------------------------------------- | |
32 | ||
33 | class wxSocketImplMSW : public wxSocketImpl | |
904ec517 | 34 | { |
4b4d23c7 | 35 | public: |
51fe4b60 VZ |
36 | wxSocketImplMSW(wxSocketBase& wxsocket); |
37 | ||
38 | virtual ~wxSocketImplMSW(); | |
39 | ||
2b036c4b | 40 | virtual wxSocketError GetLastError() const; |
51fe4b60 | 41 | |
df21920b VZ |
42 | virtual void ReenableEvents(wxSocketEventFlags WXUNUSED(flags)) |
43 | { | |
44 | // notifications are never disabled in this implementation, there is no | |
45 | // need for this as WSAAsyncSelect() only sends notification once when | |
46 | // the new data becomes available anyhow, so there is no need to do | |
47 | // anything here | |
48 | } | |
49 | ||
51fe4b60 | 50 | private: |
51fe4b60 VZ |
51 | virtual void DoClose(); |
52 | ||
53 | virtual void UnblockAndRegisterWithEventLoop() | |
53a161e1 | 54 | { |
51fe4b60 VZ |
55 | // no need to make the socket non-blocking, Install_Callback() will do |
56 | // it | |
57 | wxSocketManager::Get()->Install_Callback(this); | |
53a161e1 VZ |
58 | } |
59 | ||
51fe4b60 VZ |
60 | int m_msgnumber; |
61 | ||
62 | friend class wxSocketMSWManager; | |
904ec517 | 63 | |
c0c133e1 | 64 | wxDECLARE_NO_COPY_CLASS(wxSocketImplMSW); |
904ec517 GRG |
65 | }; |
66 | ||
2804f77d | 67 | #endif /* _WX_MSW_GSOCKMSW_H_ */ |