[Libwebsockets] multiple clients

Andy Green andy at warmcat.com
Fri Apr 7 00:43:14 CEST 2017

On April 7, 2017 2:46:44 AM GMT+08:00, Joel Winarske <joel.winarske at gmail.com> wrote:
>Hi Andy,
>Is there anything preventing simultaneous http clients, or can there
>be one at a time?

What does 'clients' mean here?  You are being the server and the clients are remote guys connecting to you?  Or they are your outgoing connections?  Either way:

No, you can have as many clients as you have sockets available.

>In my case I'm seeing two stomp on each other, but I'm figuring it's my
>code; thought I would ask!

They won't 'stomp on each other' (no better characterization also suggests it's user code) in lws.  But your user code has to be appropriate, if you point all clients at the same filescope static vars, naturally you will have problems with vars being overwritten.  Look at how the plugin type code manages a vhd for the vhost and a pss per connection.



More information about the Libwebsockets mailing list