From: Nick Mathewson Date: Tue, 21 Jan 2014 20:44:05 +0000 (-0500) Subject: Expand EV_CLOSED documentation a bit X-Git-Tag: release-2.1.4-alpha~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53d279389a05f76cf5288420f561ec93178b6c6a;p=libevent Expand EV_CLOSED documentation a bit --- diff --git a/include/event2/event.h b/include/event2/event.h index 7632c0ee..2864e61e 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -489,8 +489,12 @@ enum event_method_feature { /** Require an event method that allows file descriptors as well as * sockets. */ EV_FEATURE_FDS = 0x04, - /** Require an event method that detects premature connection close by - * clients without the necessity of reading all the pending data. */ + /** Require an event method that allows you to use EV_CLOSED to detect + * connection close without the necessity of reading all the pending data. + * + * Methods that do support EV_CLOSED may not be able to provide support on + * all kernel versions. + **/ EV_FEATURE_EARLY_CLOSE = 0x08 }; @@ -908,8 +912,12 @@ int event_base_got_break(struct event_base *); **/ #define EV_FINALIZE 0x40 /** - * Detects premature connection close by clients without the necessity of - * reading all the pending data, if supported by the backend. + * Detects connection close events. You can use this to detect when a + * connection has been closed, without having to read all the pending data + * from a connection. + * + * Not all backends support EV_CLOSED. To detect or require it, use the + * feature flag EV_FEATURE_EARLY_CLOSE. **/ #define EV_CLOSED 0x80 /**@}*/