X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c32066b58849e52e4d76e30982414d9f4daae6a..1144d24d25ebf729407db27594dd51778f77cec4:/include/wx/socket.h diff --git a/include/wx/socket.h b/include/wx/socket.h index b81f609ec4..c9e161331c 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -259,7 +259,7 @@ public: virtual bool Connect(wxSockAddress& addr_man, bool wait = TRUE); - bool WaitOnConnect(long seconds = -1); + bool WaitOnConnect(long seconds = -1, long microseconds = 0); virtual void OnRequest(wxRequestEvent flags); }; @@ -270,7 +270,6 @@ class WXDLLEXPORT wxSocketHandler : public wxObject { DECLARE_CLASS(wxSocketHandler) protected: - static wxSocketHandler *master; #if defined(__WINDOWS__) wxList *smsg_list; struct wxSockHandlerInternal *internal; @@ -280,6 +279,7 @@ protected: public: enum SockStatus { SOCK_NONE, SOCK_DATA, SOCK_CONNECT, SOCK_DISCONNECT, SOCK_ERROR }; + static wxSocketHandler *master; wxSocketHandler(); virtual ~wxSocketHandler(); @@ -303,8 +303,7 @@ public: (wxSocketBase::wxSockFlags flags = wxSocketBase::NONE); // Create or reuse a socket handler - static wxSocketHandler& Master() - { return *((master) ? (master) : (master = new wxSocketHandler())); } + static wxSocketHandler& Master() { return *master; } #if defined(WXSOCK_INTERNAL) && defined(__WINDOWS__)