On 11/1/06, Gordon Scott <[EMAIL PROTECTED]> wrote:

> Something else that might be bitting you here; you should be setting
> *lpNumberOfBytes = 0 before calling GetQueuedCompletionStatus.
 That
> way, on exit, if you have *lpNumberOfBytes == 0, you either have a
> closed remote socket (GetLastError() == 0), or some error
> (GetLastError() != 0).
>
> GetQueuedCompletionStatus doesn't randomize the lpNumberOfBytes in
> case of error, it just doesn't change it from what you set it to.


Also I believe that GetLastError() will return the standard winsock error
codes for things like a connection reset

Yeah, I don't have my code handy at the moment, but I remember
handling a remote reset in the error handling code.

Toby, the GLE error codes are documented here;

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes.asp

I'm not sure how many ways you want to slice that error.  If it is a
low resource type error, you may be able to recover from it.  Once the
I/O errors start flying on a socket though, you'll probably want to
CloseHandle on it and move on with trying to reconnect/recover in some
way.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to