Changeset 6201 for trunk/src/wsock32/asyncapi.cpp
- Timestamp:
- Jul 7, 2001, 4:29:41 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/asyncapi.cpp
r6196 r6201 1 /* $Id: asyncapi.cpp,v 1.1 0 2001-07-07 10:44:08achimha Exp $ */1 /* $Id: asyncapi.cpp,v 1.11 2001-07-07 14:29:40 achimha Exp $ */ 2 2 3 3 /* … … 731 731 //****************************************************************************** 732 732 //****************************************************************************** 733 int WSAEnumNetworkEventsWorker(SOCKET s, WSAEVENT hEvent, LPWSANETWORKEVENTS lpEvent) 734 { 735 PASYNCTHREADPARM pThreadInfo; 736 737 asyncThreadMutex.enter(); 738 pThreadInfo = FindAsyncEvent(s); 739 if (pThreadInfo) 740 { 741 // TODO return correct errors!!! 742 for (int i = 0; i < FD_MAX_EVENTS; i++) 743 { 744 lpEvent->iErrorCode[i] = 0; 745 } 746 747 lpEvent->lNetworkEvents = pThreadInfo->u.asyncselect.lEventsPending; 748 749 // TODO is this correct? API says they're cleared 750 pThreadInfo->u.asyncselect.lEventsPending = 0; 751 } 752 asyncThreadMutex.leave(); 753 if (!pThreadInfo) 754 { 755 dprintf(("no async registration for socket %x", s)); 756 // TODO: correct behavior? 757 WSASetLastError(WSAEINVAL); 758 return SOCKET_ERROR; 759 } 760 761 // post semaphore if present 762 if (hEvent) 763 { 764 // dprintf(("posting event semaphore 0x%x", hEvent)); 765 SetEvent(hEvent); 766 } 767 768 WSASetLastError(NO_ERROR); 769 return NO_ERROR; 770 } 771 //****************************************************************************** 772 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.