git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3672
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
ret = m_o_socket->Write((const char *)buffer, size).LastCount();
ret = m_o_socket->Write((const char *)buffer, size).LastCount();
- if (ret > 0)
- m_lasterror = wxStream_NOERROR;
+ if (m_o_socket->Error())
+ m_lasterror = wxStream_WRITE_ERR;
- m_lasterror = wxStream_READ_ERR;
+ m_lasterror = wxStream_NOERROR;
ret = m_i_socket->Read((char *)buffer, size).LastCount();
ret = m_i_socket->Read((char *)buffer, size).LastCount();
- if (ret > 0)
- m_lasterror = wxStream_NOERROR;
- else
+ if (m_i_socket->Error())
m_lasterror = wxStream_READ_ERR;
m_lasterror = wxStream_READ_ERR;
+ else
+ m_lasterror = wxStream_NOERROR;