Ignore:
Timestamp:
Jul 7, 2001, 12:44:11 PM (24 years ago)
Author:
achimha
Message:

implemented WSAEventSelect

File:
1 edited

Legend:

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

    r5625 r6196  
    1 /* $Id: wsock32.cpp,v 1.35 2001-04-28 16:15:18 sandervl Exp $ */
     1/* $Id: wsock32.cpp,v 1.36 2001-07-07 10:44:10 achimha Exp $ */
    22
    33/*
     
    154154  // to SetLastError()
    155155  if(iError) {
    156         dprintf(("WSASetLastError %x", iError));
     156        dprintf(("WSASetLastError 0x%x", iError));
    157157  }
    158158  SetLastError(iError);
     
    236236   }
    237237   //Close WSAAsyncSelect thread if one was created for this socket
    238    FindAndSetAsyncEvent(s, 0, 0, 0);
     238   FindAndSetAsyncEvent(s, WSA_SELECT_HWND, 0, 0, 0);
    239239
    240240   // wait thread termination
     
    863863
    864864   if(!fWSAInitialized) {
    865         WSASetLastError(WSANOTINITIALISED);
    866         return SOCKET_ERROR;
    867    }
    868    else
    869    if(WSAIsBlocking()) {
     865        dprintf(("WSA not initialized"));
     866        WSASetLastError(WSANOTINITIALISED);
     867        return SOCKET_ERROR;
     868   }
     869   else
     870   if(WSAIsBlocking()) {
     871        dprintf(("WSA is blocking"));
    870872        WSASetLastError(WSAEINPROGRESS);
    871873        return SOCKET_ERROR;
     
    887889        case SO_LINGER:
    888890                if(optlen < (int)sizeof(ws_linger)) {
     891                        dprintf(("SOL_SOCKET, SO_LINGER, optlen too small"));
    889892                        WSASetLastError(WSAEFAULT);
    890893                        return SOCKET_ERROR;
     
    899902        case SO_RCVBUF:
    900903                if(optlen < (int)sizeof(int)) {
     904                        dprintf(("SOL_SOCKET, SO_RCVBUF, optlen too small"));
    901905                        WSASetLastError(WSAEFAULT);
    902906                        return SOCKET_ERROR;
     
    923927        case SO_REUSEADDR:
    924928                if(optlen < (int)sizeof(int)) {
     929                        dprintf(("SOL_SOCKET, SO_REUSEADDR, optlen too small"));
    925930                        WSASetLastError(WSAEFAULT);
    926931                        return SOCKET_ERROR;
     
    938943        if(optname == TCP_NODELAY) {
    939944                if(optlen < (int)sizeof(int)) {
     945                        dprintf(("IPPROTO_TCP, TCP_NODELAY, optlen too small"));
    940946                        WSASetLastError(WSAEFAULT);
    941947                        return SOCKET_ERROR;
     
    950956   }
    951957   else {
     958        dprintf(("unknown level code!"));
    952959        WSASetLastError(WSAEINVAL);
    953960        return SOCKET_ERROR;
Note: See TracChangeset for help on using the changeset viewer.