[Libwebsockets] close adopted file from the user side
per at bothner.com
Thu Aug 6 01:11:57 CEST 2020
I'm trying to cleanly close a file/lws created using lws_adopt_descriptor_vhost.
In "Closing connections from the user side"
it says this should be done by having the callback return -1, and
you can force a callback using lws_callback_on_writable.
Does this apply also for "adopted" file descriptors?
What if it's a read-only file? Calling lws_callback_on_writable
doesn't seem to force a callback in this case.
I can close this file descriptor, but doesn't seem to force a callback either:
There is no LWS_CALLBACK_RAW_CLOSE_FILE call.
(There is a LWS_CALLBACK_RAW_CLOSE_FILE call for a Unix domain socket,
but not for an alias for stdin passed across over the socket.)
per at bothner.com http://per.bothner.com/
More information about the Libwebsockets