[Libwebsockets] HTTP persistent connection from libwebsockets. It's possible?

Андрей Морозов avmorosoff at gmail.com
Thu Feb 20 18:08:20 CET 2020


Thanks for the tip!

чт, 20 февр. 2020 г. в 19:38, Andy Green <andy at warmcat.com>:

>
>
> On 2/20/20 1:03 PM, Андрей Морозов wrote:
> > Hello!
> >
> > Can I create new HTTP transactions (requests) without creating new
> > connection using the libwebsockets library (persistent HTTP connection)?
>
> I assume you're creating client connections...
>
> If you want a really persistent connection, you can get it with http/2.
> If it's pipelining of connections to the same endpoint using one tcp /
> tls connection, you can get it on h1 or h2 by specifying the connection
> should use pipelining by giving the LCCSCF_PIPELINE flag.
>
>
> https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/http-client/minimal-http-client-multi/minimal-http-client-multi.c#n404-406
>
> -Andy
>
> > For example:
> >
> > GET /index.html HTTP/1.0
> > Host: www.sample.com <http://www.sample.com>
> > Connection: Keep-Alive
> >
> > GET /1.jpg HTTP/1.0
> > Host: www.sample.com <http://www.sample.com>
> > Connection: Keep-Alive
> >
> > GET /1000.jpg HTTP/1.0
> > Host: www.sample.com <http://www.sample.com>
> > Connection: close
> >
> > _______________________________________________
> > Libwebsockets mailing list
> > Libwebsockets at ml.libwebsockets.org
> > https://libwebsockets.org/mailman/listinfo/libwebsockets
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200220/568e3794/attachment.htm>


More information about the Libwebsockets mailing list