use DispatchTimeout() and/or select() with timeout instead of polling loop in wxSocket::DoWait()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-26 22:50:50 +00:00
parent 9af42efda6
commit 00414faf34
2 changed files with 84 additions and 99 deletions

View File

@@ -255,7 +255,14 @@ public:
virtual int Read(void *buffer, int size) = 0;
virtual int Write(const void *buffer, int size) = 0;
wxSocketEventFlags Select(wxSocketEventFlags flags);
// basically a wrapper for select(): returns the condition of the socket,
// blocking for not longer than timeout ms for something to become
// available
//
// flags defines what kind of conditions we're interested in, the return
// value is composed of a (possibly empty) subset of the bits set in flags
wxSocketEventFlags Select(wxSocketEventFlags flags,
unsigned long timeout = 0);
virtual wxSocketImpl *WaitConnection(wxSocketBase& wxsocket) = 0;