- Timestamp:
- Feb 20, 2002, 4:07:14 PM (24 years ago)
- Location:
- trunk/src/wsock32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/asyncapi.cpp
r7146 r7977 1 /* $Id: asyncapi.cpp,v 1.1 8 2001-10-21 13:43:51sandervl Exp $ */1 /* $Id: asyncapi.cpp,v 1.19 2002-02-20 15:07:13 sandervl Exp $ */ 2 2 3 3 /* … … 675 675 //****************************************************************************** 676 676 //****************************************************************************** 677 int WSAAsyncSelectWorker(SOCKET s, int mode, int notifyHandle, int notifyData, longlEventMask)677 int WSAAsyncSelectWorker(SOCKET s, int mode, DWORD notifyHandle, DWORD notifyData, DWORD lEventMask) 678 678 { 679 679 PASYNCTHREADPARM pThreadParm; -
trunk/src/wsock32/asyncthread.cpp
r7146 r7977 1 /* $Id: asyncthread.cpp,v 1.1 3 2001-10-21 13:43:51sandervl Exp $ */1 /* $Id: asyncthread.cpp,v 1.14 2002-02-20 15:07:13 sandervl Exp $ */ 2 2 3 3 /* … … 33 33 { 34 34 PASYNCTHREADPARM pThreadParm = (PASYNCTHREADPARM)arg; 35 #ifdef DEBUG 36 ULONG ulSocket = pThreadParm->u.asyncselect.s; 37 ULONG hTaskHandle = pThreadParm->hAsyncTaskHandle; 38 #endif 35 39 36 40 pThreadParm->asyncProc((PVOID)arg); … … 40 44 //// WSASetBlocking(FALSE, pThreadParm->hThread); 41 45 42 dprintf(("AsyncThread %x socket %x exit", pThreadParm->hAsyncTaskHandle, pThreadParm->u.asyncselect.s));46 dprintf(("AsyncThread %x socket %x exit", hTaskHandle, ulSocket)); 43 47 free((PVOID)pThreadParm); 44 48 } … … 281 285 //****************************************************************************** 282 286 //****************************************************************************** 283 BOOL QueryAsyncEvent(SOCKET s, HWND *pHwnd, int *pMsg, ULONG *plEvent) 287 BOOL QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData, 288 ULONG *plEvent) 284 289 { 285 290 PASYNCTHREADPARM pThreadInfo; … … 288 293 pThreadInfo = FindAsyncEvent(s); 289 294 if(pThreadInfo) { 290 *pHwnd = (HWND)pThreadInfo->notifyHandle; 291 *pMsg = pThreadInfo->notifyData; 292 *plEvent = pThreadInfo->u.asyncselect.lEvents; 295 *pMode = pThreadInfo->u.asyncselect.mode; 296 *pNofityHandle = pThreadInfo->notifyHandle; 297 *pNofityData = pThreadInfo->notifyData; 298 *plEvent = pThreadInfo->u.asyncselect.lEvents; 293 299 } 294 300 asyncThreadMutex.leave(); -
trunk/src/wsock32/asyncthread.h
r7140 r7977 1 /* $Id: asyncthread.h,v 1.1 0 2001-10-19 18:34:47 achimhaExp $ */1 /* $Id: asyncthread.h,v 1.11 2002-02-20 15:07:14 sandervl Exp $ */ 2 2 3 3 /* … … 40 40 ASYNCTHREADPROC asyncProc; 41 41 VMutex *parmmutex; 42 intnotifyHandle;43 intnotifyData;42 DWORD notifyHandle; 43 DWORD notifyData; 44 44 LPSTR buf; 45 45 DWORD buflen; … … 89 89 90 90 void EnableAsyncEvent(SOCKET s, ULONG flags); 91 BOOL QueryAsyncEvent(SOCKET s, HWND *pHwnd, int *pMsg, ULONG *plEvent);91 BOOL QueryAsyncEvent(SOCKET s, int *pMode, ULONG *pNofityHandle, ULONG *pNofityData, ULONG *plEvent); 92 92 BOOL FindAndSetAsyncEvent(SOCKET s, int mode, int notifyHandle, int notifyData, ULONG lEventMask); 93 93 -
trunk/src/wsock32/wsock32.cpp
r7805 r7977 1 /* $Id: wsock32.cpp,v 1.4 6 2002-02-06 10:33:56sandervl Exp $ */1 /* $Id: wsock32.cpp,v 1.47 2002-02-20 15:07:14 sandervl Exp $ */ 2 2 3 3 /* … … 376 376 //to blocking mode 377 377 if (cmd == FIONBIO) { 378 HWND hwnd;379 int m sg;378 ULONG ulNotifyHandle, ulNotifyData; 379 int mode; 380 380 ULONG lEvent; 381 381 382 if(QueryAsyncEvent(s, &hwnd, &msg, &lEvent) == TRUE) { 382 if(QueryAsyncEvent(s, &mode, &ulNotifyHandle, &ulNotifyData, &lEvent) == TRUE) 383 { 383 384 if(*argp != 0) { 384 385 //nothing to do; already non-blocking … … 521 522 int *, addrlen) 522 523 { 523 int ret, msg; 524 HWND hwnd; 525 ULONG lEvent; 524 int ret, mode; 525 ULONG lEvent, notifyData, notifyHandle; 526 526 527 527 if(!fWSAInitialized) { … … 549 549 //if this socket has an active async. select pending, then call WSAAsyncSelect 550 550 //with the same parameters for the new socket (see docs) 551 if(QueryAsyncEvent(s, & hwnd, &msg, &lEvent) == TRUE) {552 if(WSAAsyncSelect (ret, hwnd, msg, lEvent) == SOCKET_ERROR) {551 if(QueryAsyncEvent(s, &mode, ¬ifyHandle, ¬ifyData, &lEvent) == TRUE) { 552 if(WSAAsyncSelectWorker(s, mode, notifyHandle, notifyData, lEvent) == SOCKET_ERROR) { 553 553 ret = SOCKET_ERROR; 554 554 } … … 948 948 struct ws_linger *yy; 949 949 struct linger xx; 950 int ret ;950 int ret, val; 951 951 ULONG size; 952 952 char *safeoptval; … … 1159 1159 return SOCKET_ERROR; 1160 1160 } 1161 dprintf(("IPPROTO_IP, IP_HDRINCL 0x%x", *optval)); 1162 ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL_OS2, (char *)optval, optlen); 1161 val = *optval; 1162 dprintf(("IPPROTO_IP, IP_HDRINCL 0x%x", val)); 1163 ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL_OS2, (char *)&val, optlen); 1163 1164 break; 1164 1165 -
trunk/src/wsock32/wsock32.h
r7368 r7977 1 /* $Id: wsock32.h,v 1.2 0 2001-11-16 16:55:20sandervl Exp $ */1 /* $Id: wsock32.h,v 1.21 2002-02-20 15:07:14 sandervl Exp $ */ 2 2 3 3 /* WSOCK32.H--definitions & conversions for Odin's wsock32.dll. … … 248 248 #define WSA_SELECT_HEVENT 2 249 249 // async select worker routine 250 int WSAAsyncSelectWorker(SOCKET s, int mode, int notifyHandle, int notifyData, longlEventMask);250 int WSAAsyncSelectWorker(SOCKET s, int mode, DWORD notifyHandle, DWORD notifyData, DWORD lEventMask); 251 251 252 252 typedef struct _WSANETWORKEVENTS
Note:
See TracChangeset
for help on using the changeset viewer.