[Libwebsockets] multiple clients
joel.winarske at gmail.com
Fri Apr 7 00:58:53 CEST 2017
Multiple http client instances via lws_client_connect_via_info().
Where can I find a good example of using the "user" pointer in callbacks?
On Thu, Apr 6, 2017 at 3:43 PM, Andy Green <andy at warmcat.com> wrote:
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets