On 11/1/06, Toby Douglass <[EMAIL PROTECTED]> wrote:
According to my reading of the docs, GetQueuedCompletionStatus has four return status';--- 1. return value != 0 - all went well, we've just returned from a successful dequeuing 2. return value != 0 and lpOverlapped == NULL - all handles associated with the IO completion object have been closed and the IO completion object itself has been closed (time to quit) 3. return value == 0 and lpOverlapped != NULL - GetQueuedCompletionStatus() was okay, but we dequeued a *failed* IO operation (note that lpNumberOfBytes is not set in this case) 4. return value == ERROR_SUCCESS and lpOverlapped != NULL and *lpNumberOfBytes == 0 - the handle we've come back on is actually a socket, and the remote host has closed --- Now, the problem is this: ERROR_SUCCESS is #defined as zero! In other words, I don't think it's possible to differentiate between case 3 and 4, because in case 3, *lpNumberOfBytes might be 0 just by chance.
Call GetLastError(). _______________________________________________ Libevent-users mailing list [email protected] http://monkey.org/mailman/listinfo/libevent-users
