mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
![]() This adds some new objects and helpers for keeping and logging info on grouped allocations, a group is, eg, SS handles or client wsis. Allocated objects get a context-unique "tag" string intended to replace %p / wsi pointers etc. Pointers quickly become confusing when allocations are freed and reused, the tag string won't repeat until you produce 2^64 objects in a context. In addition the tag string documents the object group, with prefixes like "wsi-" or "vh-" and contain object-specific additional information like the vhost name, address / port or the role of the wsi. At creation time the lws code can use a format string and args to add whatever group-specific info makes sense, eg, a wsi bound to a secure stream can also append the guid of the secure stream, it's copied into the new object tag and so is still available cleanly after the stream is destroyed if the wsi outlives it. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
minimal-http-client-multi.c | ||
README.md | ||
warmcat.com.cer |
lws minimal http client multi
build
$ cmake . && make
usage
The application goes to https://warmcat.com and receives the page data same as minimal http client.
However it does it for 8 client connections concurrently.
Commandline Options
Option | Meaning |
---|---|
-s | Stagger the connections by 100ms, the last by 1s |
-p | Use http/1.1 pipelining or h2 simultaneous streams |
--h1 | Force http/1 only |
-l | Connect to server on https://localhost:7681 instead of https://warmcat.com:443 |
-n | Read numbered files like /1.png, /2.png etc. Default is just read / |
--uv | Use libuv event loop if lws built for it |
--event | Use libevent event loop if lws built for it |
--ev | Use libev event loop if lws built for it |
--post | POST to the server rather than GET |
-c | Create n connections (n can be 1 .. 8) |
--path | Force the URL path (should start with /) |