[Libwebsockets] External poll and listener usage
vitalik.voip at gmail.com
Thu Feb 9 16:54:10 CET 2017
Hello, libwesockets community.
I'm planning to use libwesockets to add WS support to an existing server
application with its existing event loop (poll) and listening socket.
External poll integration looks quite simple and test server provided with
sources is a good example. As I've already mentioned my server accepts
clients connections itself.
*lws_adopt_socket()* does the job and lws successfully adopts provided fd.
Since I don't use lws internal listener I wanted to turn it off and found
two lws context options: CONTEXT_PORT_NO_LISTEN
and CONTEXT_PORT_NO_LISTEN_SERVER (not in 2.1 stable).
Documentation about mentioned options is not clear for me. I
tried CONTEXT_PORT_NO_LISTEN_SERVER with the latest master branch
and CONTEXT_PORT_NO_LISTEN with the 2.1 stable and in both cases my test
HTTP (not ws yet) server didn't start internal listener and took provided
client's fd without any problems. So what is the real difference between
them for a WS server?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets