document revent clearing scheme
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
b1a5e6c377
commit
58f214ea0c
2 changed files with 13 additions and 0 deletions
|
@ -156,6 +156,13 @@ LWS_CALLBACK_SET_MODE_POLL_FD and LWS_CALLBACK_CLEAR_MODE_POLL_FD
|
|||
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
|
||||
----------------------
|
||||
|
|
|
@ -14,6 +14,12 @@ User api additions
|
|||
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
|
||||
----------------
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue