Gordon Scott wrote:

Now - here's the rub - what's to prevent *lpNumberOfBytes being 0 in
case 3?  the docs say in case 3, the value in *lpNumberOfBytes is not
set by GetQueuedCompletionStatus().  So, it would retain whatever value
I set it to originally.  I'm thinking then that I need to set
*lpNumberOfBytes to a value, say 1, and then if it's different, I'll be
able to *know* it was set to 0.

Not true.  As per the documentation in condition 3 sets the number of bytes
read. If there is an error and 0 bytes have been read, it will be set to 0.

Hmm. Re-reading the docs, I'm starting to think that that final sentence in return values about socket closure is red herring.

It *reads* like it's telling you a fourth unique return value case; but actually, maybe all it's doing is pointing out to you what you'll see when a socket closes - and failing to mention, as it were, that it's only a specific case of the general instance of case 3.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to