document revent clearing scheme
Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/README.coding b/README.coding
index 0231d03..d26c21d 100644
--- a/README.coding
+++ b/README.coding
@@ -156,6 +156,13 @@
appear in the callback for protocol 0 and allow interface code to
manage socket descriptors in other poll loops.
+You can pass all pollfds that need service to libwebsocket_service_fd(), even
+if the socket or file does not belong to libwebsockets it is safe.
+
+If libwebsocket handled it, it zeros the pollfd revents field before returning.
+So you can let libwebsockets try and if pollfd->revents is nonzero on return,
+you know it needs handling by your code.
+
Using with in c++ apps
----------------------
diff --git a/changelog b/changelog
index f0278dc..985d71b 100644
--- a/changelog
+++ b/changelog
@@ -14,6 +14,12 @@
added, replacing CIPHERS_LIST_STRING. NULL means use the ssl library
default list of ciphers.
+ - Not really an api addition, but libwebsocket_service_fd() will now zero
+ the revents field of the pollfd it was called with if it handled the
+ descriptor. So you can tell if it is a non-lws fd by checking revents
+ after the service call... if it's still nonzero, the descriptor
+ belongs to you and you need to take care of it.
+
User api changes
----------------