- virtual void OnRequest(wxRequestEvent flags);
-};
-
-////////////////////////////////////////////////////////////////////////
-
-class WXDLLEXPORT wxSocketHandler : public wxObject
-{
- DECLARE_CLASS(wxSocketHandler)
-protected:
- wxList *socks;
-
-public:
- enum SockStatus { SOCK_NONE, SOCK_DATA, SOCK_CONNECT, SOCK_DISCONNECT,
- SOCK_ERROR };
- static wxSocketHandler *master;
-
- wxSocketHandler();
- virtual ~wxSocketHandler();
-
- void Register(wxSocketBase* sock);
- void UnRegister(wxSocketBase* sock);
-
- unsigned long Count() const;
-
- // seconds = -1 means indefinite wait
- // seconds = 0 means no wait
- // seconds > 0 means specified wait
-
- int Wait(long seconds = -1, long microseconds = 0);
- void YieldSock();
-
- wxSocketServer *CreateServer
- (wxSockAddress& addr,
- wxSocketBase::wxSockFlags flags = wxSocketBase::NONE);
- wxSocketClient *CreateClient
- (wxSocketBase::wxSockFlags flags = wxSocketBase::NONE);
-
- // Create or reuse a socket handler
- static wxSocketHandler& Master() { return *master; }
-
-#if defined(WXSOCK_INTERNAL) && defined(__WINDOWS__)
-
- friend LRESULT APIENTRY _EXPORT wxSocketHandlerWndProc(HWND hWnd,
- UINT message, WPARAM wParam, LPARAM lParam);
-
- UINT NewMessage(wxSocketBase *sock);
- void DestroyMessage(UINT msg);
-
- HWND GetHWND() const;
-#endif