[Libwebsockets] How to send multiple request via same connection

Andy Green andy at warmcat.com
Tue Sep 19 06:19:46 CEST 2017

On 09/19/2017 05:26 AM, Rinat wrote:
> Hello
> I'm making client and would like to send multiple requests (for example 
> GET) using the same connection.
> After the first connect:
> wsi = lws_client_connect_via_info(&i);
> Client automatically send the first GET request, and process the HTML 
> response.I could initiate aconnection again calling the same function, 
> but it's have big overheads (SSL connection establishment).

You're right about the overhead, but it's not supported yet for client 
side... server side has supported it for years.

Until http client was added a while back there was no use for it, since 
once you upgrade the connection to ws there is no more http allowed on 
it anyway, and this is "libwebsockets".

I think it's logical to add it, but it's not the #1 thing I am working 
on (patches welcome).


> Best regards,
> Rinat Yaminov
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list