]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
avoid conflict between wxBookCtrlBase::DoSetSelection() and the derived classes;...
[wxWidgets.git] / src / common / socket.cpp
index 1448cbf02c4d07a7fa717b2f6ca7cd7c524168aa..28a929198ce9ed97b8680ef100b52a537d5df2d8 100644 (file)
 
 #if wxUSE_SOCKETS
 
+#include "wx/socket.h"
+
 #ifndef WX_PRECOMP
     #include "wx/object.h"
+    #include "wx/string.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/event.h"
+    #include "wx/app.h"
+    #include "wx/utils.h"
+    #include "wx/timer.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/app.h"
 #include "wx/apptrait.h"
-#include "wx/string.h"
-#include "wx/timer.h"
-#include "wx/utils.h"
-#include "wx/module.h"
-#include "wx/log.h"
-#include "wx/intl.h"
-#include "wx/event.h"
 
 #include "wx/sckaddr.h"
-#include "wx/socket.h"
 #include "wx/datetime.h"
 
 // DLL options compatibility check:
@@ -329,11 +330,9 @@ wxUint32 wxSocketBase::_Read(void* buffer, wxUint32 nbytes)
 
   // Return now in one of the following cases:
   // - the socket is invalid,
-  // - we got all the data,
-  // - we got *some* data and we are not using wxSOCKET_WAITALL.
+  // - we got all the data
   if ( !m_socket ||
-       !nbytes ||
-       ((total != 0) && !(m_flags & wxSOCKET_WAITALL)) )
+       !nbytes )
     return total;
 
   // Possible combinations (they are checked in this order)