[Libwebsockets] Lws_service with specific socket
andy at warmcat.com
Tue Dec 19 11:56:18 CET 2017
On 12/19/2017 06:42 PM, Théo BRIGNOL wrote:
> I have a question regarding a simple case.
> I want to create a main socket in my main program.
> In order to do that, I create a main context with default protocols and
> one specific listening port.
That much is simple.
> This main program will launch as many as sub-programs that whe decided
> with the function "execl".
He launches them in response to a user connecting? Or he always has
What does he do with the inputs and outputs?
> I want this sub-programs to redefine protocols, and accept connection on
You cannot "redefine a protocol" on a ws connection once it has been
negotiated, if that is what you mean.
> the main port on the main socket (the "father" socket). Note that with
> execl I can't pass main context as a parameter.
You might think you have explained it, but I have little idea what
you're trying to do.
Lws supports cgi, when you signed up for the mailing list you are
running python scripts (in their own processes) from :443 and the io is
redirected to your https connection. Is that what you are talking about?
> The fact is that I tried many solutions without succes
> (LWS_EXPLICIT_VHOST option, external poll fd, etc..).
> Have you any idea in order to do that ?
The best thing is explain more about what you are trying to do. Lws can
do a lot of things. For example you do not explain if you are talking
about ws connections or http connections.
You should probably explain about what the incoming connection feels
that these separate processes do for him.
> Thank you for your comprehension.
> Best Regards,
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets