streamline handling of wxSOCKET_LOST in DoWait()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-02 22:07:45 +00:00
parent f26d81383f
commit ebbf740764
2 changed files with 30 additions and 43 deletions

View File

@@ -204,21 +204,19 @@ private:
// wait until the given flags are set for this socket or the given timeout
// (or m_timeout) expires
//
// notice that wxSOCKET_LOST_FLAG is always taken into account but the
// return value depends on whether it is included in flags or not: if it
// is, and the connection is indeed lost, true is returned, but if it isn't
// then the function returns false in this case
//
// false is always returned if we returned because of the timeout expiration
bool DoWait(long timeout, wxSocketEventFlags flags);
// notice that wxSOCKET_LOST_FLAG is always taken into account and the
// function returns -1 if the connection was lost; otherwise it returns
// true if any of the events specified by flags argument happened or false
// if the timeout expired
int 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);
int DoWait(long seconds, long milliseconds, wxSocketEventFlags flags);
// another helper calling DoWait() using our m_timeout
bool DoWaitWithTimeout(wxSocketEventFlags flags)
int DoWaitWithTimeout(wxSocketEventFlags flags)
{
return DoWait(m_timeout*1000, flags);
}