X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c363ead1e206e599d6564ac939ac7342d165e0e3..12f5219fac9b1010a24ecb31df71c4b9703eb752:/include/wx/private/socket.h diff --git a/include/wx/private/socket.h b/include/wx/private/socket.h index 0bc2f3b810..89a5bd0004 100644 --- a/include/wx/private/socket.h +++ b/include/wx/private/socket.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/private/socket.h -// Purpose: wxSocketImpl nd related declarations +// Purpose: wxSocketImpl and related declarations // Authors: Guilhem Lavaux, Vadim Zeitlin // Created: April 1997 // RCS-ID: $Id$ @@ -139,6 +139,9 @@ public: virtual void OnExit() = 0; + // create the socket implementation object matching this manager + virtual wxSocketImpl *CreateSocket(wxSocketBase& wxsocket) = 0; + // these functions enable or disable monitoring of the given socket for the // specified events inside the currently running event loop (but notice // that both BSD and Winsock implementations actually use socket->m_server @@ -167,16 +170,12 @@ private: Base class for all socket implementations providing functionality common to BSD and Winsock sockets. - Objects of this class are not created directly but only via its static - Create() method which is implemented in port-specific code. + Objects of this class are not created directly but only via the factory + function wxSocketManager::CreateSocket(). */ class wxSocketImpl { public: - // static factory function: creates the low-level socket associated with - // the given wxSocket (and inherits its attributes such as timeout) - static wxSocketImpl *Create(wxSocketBase& wxsocket); - virtual ~wxSocketImpl(); // set various socket properties: all of those can only be called before @@ -286,6 +285,11 @@ public: // named) OnRequest() method void NotifyOnStateChange(wxSocketNotify event); + // called after reading/writing the data from/to the socket and should + // enable back the wxSOCKET_INPUT/OUTPUT_FLAG notifications if they were + // turned off when this data was first detected + virtual void ReenableEvents(wxSocketEventFlags flags) = 0; + // TODO: make these fields protected and provide accessors for those of // them that wxSocketBase really needs //protected: @@ -360,7 +364,7 @@ private: // socket is shut down wxSocketBase *m_wxsocket; - DECLARE_NO_COPY_CLASS(wxSocketImpl) + wxDECLARE_NO_COPY_CLASS(wxSocketImpl); }; #if defined(__WXMSW__)