aboutsummaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 1c53ec8..c93ec6e 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -219,9 +219,17 @@ size_t Bu::Socket::read( void *pBuf, size_t nBytes )
219#endif 219#endif
220 if( nRead < 0 ) 220 if( nRead < 0 )
221 { 221 {
222#ifdef WIN32
223 int iWSAError = DYNLOAD WSAGetLastError();
224 if( iWSAError == WSAEWOULDBLOCK )
225 return 0;
226 printf( "WSAGetLastError: %d\n", iWSAError );
227 return 0;
228#else
222 if( errno == EAGAIN ) 229 if( errno == EAGAIN )
223 return 0; 230 return 0;
224 throw SocketException( SocketException::cRead, strerror(errno) ); 231 throw SocketException( SocketException::cRead, strerror(errno) );
232#endif
225 } 233 }
226 return nRead; 234 return nRead;
227} 235}