[Libwebsockets] how to "close" wsi created by lws_adopt_descriptor_vhost

Per Bothner per at bothner.com
Wed Oct 11 07:41:39 CEST 2017

After creating outwsi thus:
   outwsi =lws_adopt_descriptor_vhost(vhost, 0, fd, "pty", NULL);
how do we "close" outwsi when fd is closed?

Specifically, after close(fd) I need for delete_from_fd(context, fd) to happen,
otherwise a later lws_adopt_descriptor_vhost that reuses the fd will fail
when calling insert_wsi.  However, delete_from_fd is private, and I haven't found
any corresponding public API.
	--Per Bothner
per at bothner.com   http://per.bothner.com/

More information about the Libwebsockets mailing list