Changeset 3504 for trunk/src


Ignore:
Timestamp:
May 9, 2000, 9:01:23 PM (25 years ago)
Author:
sandervl
Message:

experimental recv fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wsock32/wsock32.cpp

    r3498 r3504  
    1 /* $Id: wsock32.cpp,v 1.30 2000-05-05 18:22:23 sandervl Exp $ */
     1/* $Id: wsock32.cpp,v 1.31 2000-05-09 19:01:23 sandervl Exp $ */
    22
    33/*
     
    593593   if(ret == SOCKET_ERROR) {
    594594        WSASetLastError(wsaErrno());
     595   }
     596   else
     597   if(ret == 0) {
     598        int tmp, state;
     599
     600        state = ioctl(s, FIOBSTATUS, (char *)&tmp, sizeof(tmp));
     601        if(state & SS_ISCONNECTED && flags != MSG_PEEK) {
     602                dprintf(("recv returned 0, but socket is still connected -> return WSAWOULDBLOCK"));
     603                WSASetLastError(WSAEWOULDBLOCK);
     604                ret = SOCKET_ERROR;
     605        }
    595606   }
    596607   else WSASetLastError(NO_ERROR);
Note: See TracChangeset for help on using the changeset viewer.