]> git.saurik.com Git - wxWidgets.git/commitdiff
Now uses wxSocketBase::Error() to see if last IO call failed
authorGuillermo Rodriguez Garcia <guille@iies.es>
Wed, 15 Sep 1999 00:17:15 +0000 (00:17 +0000)
committerGuillermo Rodriguez Garcia <guille@iies.es>
Wed, 15 Sep 1999 00:17:15 +0000 (00:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sckstrm.cpp

index ebb6441a11398cef41d69f8e35c9bfc27aebd889..1e1417c416d411155459f7b0890279031ba968c5 100644 (file)
@@ -48,10 +48,10 @@ size_t wxSocketOutputStream::OnSysWrite(const void *buffer, size_t size)
 
   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;
   else
   else
-    m_lasterror = wxStream_READ_ERR;
+    m_lasterror = wxStream_NOERROR;
 
   return ret;
 
 
   return ret;
 
@@ -76,10 +76,10 @@ size_t wxSocketInputStream::OnSysRead(void *buffer, size_t size)
 
   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;
 
   return ret;
 }
 
   return ret;
 }