]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/sockmsw.h
13319931cd7a84bd110358d715792c789c7045f0
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/gsockmsw.h
3 // Purpose: MSW-specific socket implementation
4 // Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin
6 // Copyright: (C) 1999-1997, Guilhem Lavaux
7 // (C) 1999-2000, Guillermo Rodriguez Garcia
8 // (C) 2008 Vadim Zeitlin
10 // License: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_MSW_GSOCKMSW_H_
15 #define _WX_MSW_GSOCKMSW_H_
17 #include "wx/msw/wrapwin.h"
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>
25 #if defined(__WXWINCE__) || defined(__CYGWIN__)
29 // ----------------------------------------------------------------------------
30 // MSW-specific socket implementation
31 // ----------------------------------------------------------------------------
33 class wxSocketImplMSW
: public wxSocketImpl
36 wxSocketImplMSW(wxSocketBase
& wxsocket
);
38 virtual ~wxSocketImplMSW();
40 virtual wxSocketError
GetLastError() const;
42 virtual int Read(void *buffer
, int size
);
43 virtual int Write(const void *buffer
, int size
);
46 virtual void DoClose();
48 virtual void UnblockAndRegisterWithEventLoop()
50 // no need to make the socket non-blocking, Install_Callback() will do
52 wxSocketManager::Get()->Install_Callback(this);
55 wxSocketError
Connect_Timeout();
56 int Recv_Stream(void *buffer
, int size
);
57 int Recv_Dgram(void *buffer
, int size
);
58 int Send_Stream(const void *buffer
, int size
);
59 int Send_Dgram(const void *buffer
, int size
);
63 friend class wxSocketMSWManager
;
65 DECLARE_NO_COPY_CLASS(wxSocketImplMSW
)
68 #endif /* _WX_MSW_GSOCKMSW_H_ */