X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a737331db68b754c8bf31fa0a15f6d1f207b40bf..98216d409fb8f0b95f5bf01e59ae36c2b0a90210:/include/wx/sckint.h diff --git a/include/wx/sckint.h b/include/wx/sckint.h index e90dfb939c..0a3ca5b5e5 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); @@ -100,6 +102,8 @@ class SocketRequester: public wxThread { wxSocketInternal *m_internal; int m_fd; }; +#endif + // wxUSE_THREADS class wxSocketInternal { public: @@ -114,13 +118,12 @@ class wxSocketInternal { void ReleaseFD(); int GetFD() { return m_fd; } + void SetFD(int fd) { m_fd = fd; } - void InitializeSocket(); - void FinalizeSocket(); - void PauseSocket(); - void ResumeSocket(); - void EnableWaiter(); - void DisableWaiter(); + void ResumeWaiter(); + void StopWaiter(); + void ResumeRequester(); + void StopRequester(); void QueueRequest(SockRequest *request, bool async); void WaitForEnd(SockRequest *request); @@ -128,13 +131,16 @@ class wxSocketInternal { SockRequest *WaitForReq(); void EndRequest(SockRequest *req); public: - wxMutex m_socket_locker, m_fd_locker, m_request_locker; - wxCondition m_socket_cond; wxSocketBase *m_socket; +#if wxUSE_THREADS + wxMutex m_socket_locker, m_fd_locker, m_request_locker, m_end_requester; + wxCondition m_socket_cond; SocketWaiter *m_thread_waiter; SocketRequester *m_thread_requester; +#endif wxList m_requests; int m_fd; + bool m_invalid_requester; }; #endif