got rid of wxSocketBase::m_error which could get out of sync with wxSocketImpl::m_error -- one error indicator is enough
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -116,7 +116,7 @@ public:
|
||||
// state
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_impl != NULL; }
|
||||
bool Error() const { return m_error; }
|
||||
bool Error() const { return LastError() != wxSOCKET_NOERROR; }
|
||||
bool IsClosed() const { return m_closed; }
|
||||
bool IsConnected() const { return m_connected; }
|
||||
bool IsData() { return WaitForRead(0, 0); }
|
||||
@@ -217,6 +217,9 @@ private:
|
||||
void Pushback(const void *buffer, wxUint32 size);
|
||||
wxUint32 GetPushback(void *buffer, wxUint32 size, bool peek);
|
||||
|
||||
// store the given error as the LastError()
|
||||
void SetError(wxSocketError error);
|
||||
|
||||
private:
|
||||
// socket
|
||||
wxSocketImpl *m_impl; // port-specific implementation
|
||||
@@ -228,9 +231,7 @@ private:
|
||||
bool m_establishing; // establishing connection?
|
||||
bool m_reading; // busy reading?
|
||||
bool m_writing; // busy writing?
|
||||
bool m_error; // did last IO call fail?
|
||||
bool m_closed; // was the other end closed?
|
||||
// (notice that m_error is also set then)
|
||||
wxUint32 m_lcount; // last IO transaction size
|
||||
unsigned long m_timeout; // IO timeout value in seconds
|
||||
wxList m_states; // stack of states
|
||||
|
Reference in New Issue
Block a user