X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63496c98fae055cfc33d9f9f688f97bf43956b21..bb0054cda81e7a6a6e1f33f4b47e46f529110f14:/include/wx/sckint.h diff --git a/include/wx/sckint.h b/include/wx/sckint.h index 815d3e56a8..3fec426a7a 100644 --- a/include/wx/sckint.h +++ b/include/wx/sckint.h @@ -61,6 +61,8 @@ class SockRequest }; class wxSocketInternal; + +#if wxUSE_THREADS class SocketWaiter: public wxThread { public: SocketWaiter(wxSocketBase *socket, wxSocketInternal *internal); @@ -80,7 +82,11 @@ class SocketWaiter: public wxThread { int m_fd; }; -class SocketRequester: public wxThread { +class SocketRequester +#if wxUSE_THREADS + : public wxThread +#endif + { public: SocketRequester(wxSocketBase *socket, wxSocketInternal *internal); ~SocketRequester(); @@ -100,6 +106,8 @@ class SocketRequester: public wxThread { wxSocketInternal *m_internal; int m_fd; }; +#endif + // wxUSE_THREADS class wxSocketInternal { public: @@ -114,6 +122,7 @@ class wxSocketInternal { void ReleaseFD(); int GetFD() { return m_fd; } + void SetFD(int fd) { m_fd = fd; } void ResumeWaiter(); void StopWaiter(); @@ -126,10 +135,12 @@ class wxSocketInternal { SockRequest *WaitForReq(); void EndRequest(SockRequest *req); public: + wxSocketBase *m_socket; +#if wxUSE_THREADS wxMutex m_socket_locker, m_fd_locker, m_request_locker, m_end_requester; wxCondition m_socket_cond; - wxSocketBase *m_socket; SocketWaiter *m_thread_waiter; +#endif SocketRequester *m_thread_requester; wxList m_requests; int m_fd;