typedef struct{ OVERLAPPED Overlapped; WSABUF DataBuf; CHAR Buffer [DATA_BUFERSIZE]; DWORD BytesSEND; DWORD BytesTECB;}PER_IO_OPERATION_DATA,*LPPER_IO_OPERATION_DATA; typedef struct { SOCKET Socket; }PER_HANDLE_DATA,*LPPER_HANDLE_DATA; //服務(wù)器接收數(shù)據(jù)線程 DWORD WINAPI ServerWorkerThread(LPVOID CompletionPortID) { HANDLE CompletionPort=(HANDLE) CompletionPortID; DWORD BytesTransferred; LPPER_HANDLE_DATA PerHandleData; LPPER_IO_OPERATION_DATA PerIoData; DWORD SendBytes,RecbBytes; DWORD Flags; while(TRUE) { if (GetQueuedCompletionStatus(CompletionPort,&BytesTransferred,(LPDWORD)&PerHandleData,(LPOVERLAPPED *)&PerIoData,INFINITE)==0) ////////有三個問題:(1)函數(shù)GetQueuedCompletionStatus()對實(shí)參PerHandleData、PerIoData如何處理?(2)這個過程函數(shù)是不是對變量PerHandleData、PerIoData賦值?(3)前面定義了兩個結(jié)構(gòu)體,結(jié)構(gòu)體對象作PerHandleData、PerIoData為實(shí)參。{ reurn 0; } ......}
- 1 回答
- 0 關(guān)注
- 145 瀏覽