unix, windows: report socket hangup to uv_poll_t callback #623

bnoordhuis opened this Issue Nov 12, 2012 · 2 comments

3 participants


Report AFD_POLL_DISCONNECT / EPOLLRDHUP / EV_EOF / (whatever event ports reports, if anything) as UV_DISCONNECT to the uv_poll_t callback.

Make it clear in the API documentation that it's an optional event in that it a) may not be reported, and b) the user is free to ignore it (but that it helps optimize the shutdown path because you avoid an extra read or write).

The event name is TBD but UV_DISCONNECT seems reasonable.


Wow! I could really use this right now. When you say "it's an optional event", do you mean that it's part of the uv_poll_event enum, but you do not have to explicitly request it during uv_poll_start() in order for your callback to be called with it? I would imagine that you'd have to or it into the requested events as part of uv_poll_start(), but I wanna make sure I understand you here.

Joyent member

@gabrielschulhof please open an issue on https://github.com/libuv/libuv, that's where libuv lives today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment