fix WaitForXXX() to work as before: if the socket is already ready for reading/writing they should return immediately

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-02 01:00:40 +00:00
parent 38418fdeae
commit 6f405b31b2
2 changed files with 43 additions and 12 deletions

View File

@@ -211,8 +211,19 @@ private:
// function returns false in this case
//
// false is always returned if we returned because of the timeout expiration
bool DoWait(long timeout, wxSocketEventFlags flags);
// a helper calling DoWait() using the same convention as the public
// WaitForXXX() functions use, i.e. use our timeout if seconds == -1 or the
// specified timeout otherwise
bool DoWait(long seconds, long milliseconds, wxSocketEventFlags flags);
// another helper calling DoWait() using our m_timeout
bool DoWaitWithTimeout(wxSocketEventFlags flags)
{
return DoWait(m_timeout*1000, flags);
}
// pushback buffer
void Pushback(const void *buffer, wxUint32 size);
wxUint32 GetPushback(void *buffer, wxUint32 size, bool peek);