1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/private/gsocketiohandler.h
3 // Purpose: class for registering GSocket in wxSelectDispatcher
4 // Authors: Lukasz Michalski
5 // Created: December 2006
6 // Copyright: (c) Lukasz Michalski
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_PRIVATE_GSOCKETIOHANDLER_H_
12 #define _WX_PRIVATE_GSOCKETIOHANDLER_H_
16 #if wxUSE_SOCKETS && wxUSE_SELECT_DISPATCHER
18 #include "wx/private/selectdispatcher.h"
19 #include "wx/gsocket.h"
21 class WXDLLIMPEXP_BASE wxGSocketIOHandler
: public wxFDIOHandler
24 wxGSocketIOHandler(GSocket
* socket
)
30 int GetFlags() const { return m_flags
; }
31 void RemoveFlag(wxFDIODispatcherEntryFlags flag
) { m_flags
&= ~flag
; }
32 void AddFlag(wxFDIODispatcherEntryFlags flag
) { m_flags
|= flag
; }
34 virtual void OnReadWaiting() { m_socket
->Detected_Read(); }
35 virtual void OnWriteWaiting() { m_socket
->Detected_Write(); }
36 virtual void OnExceptionWaiting() { m_socket
->Detected_Read(); }
43 #endif // wxUSE_SOCKETS && wxUSE_SELECT_DISPATCHER
45 #endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_