]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/sockmsw.h
XRC: make wxSplitterWindow's sashpos and minpanesize dimensions.
[wxWidgets.git] / include / wx / msw / private / sockmsw.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/private/gsockmsw.h
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 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12
13 #ifndef _WX_MSW_GSOCKMSW_H_
14 #define _WX_MSW_GSOCKMSW_H_
15
16 #include "wx/msw/wrapwin.h"
17
18 #if defined(__CYGWIN__)
19 //CYGWIN gives annoying warning about runtime stuff if we don't do this
20 # define USE_SYS_TYPES_FD_SET
21 # include <sys/types.h>
22 #endif
23
24 #if defined(__WXWINCE__) || defined(__CYGWIN__)
25 #include <winsock.h>
26 #endif
27
28 // ----------------------------------------------------------------------------
29 // MSW-specific socket implementation
30 // ----------------------------------------------------------------------------
31
32 class wxSocketImplMSW : public wxSocketImpl
33 {
34 public:
35 wxSocketImplMSW(wxSocketBase& wxsocket);
36
37 virtual ~wxSocketImplMSW();
38
39 virtual wxSocketError GetLastError() const;
40
41 virtual void ReenableEvents(wxSocketEventFlags WXUNUSED(flags))
42 {
43 // notifications are never disabled in this implementation, there is no
44 // need for this as WSAAsyncSelect() only sends notification once when
45 // the new data becomes available anyhow, so there is no need to do
46 // anything here
47 }
48
49 private:
50 virtual void DoClose();
51
52 virtual void UnblockAndRegisterWithEventLoop()
53 {
54 // no need to make the socket non-blocking, Install_Callback() will do
55 // it
56 wxSocketManager::Get()->Install_Callback(this);
57 }
58
59 int m_msgnumber;
60
61 friend class wxSocketMSWManager;
62
63 wxDECLARE_NO_COPY_CLASS(wxSocketImplMSW);
64 };
65
66 #endif /* _WX_MSW_GSOCKMSW_H_ */