• Home
Name Date Size #Lines LOC

..--

CMakeLists.txtD07-Sep-20241.3 KiB3631

README.mdD07-Sep-20242.1 KiB5444

minimal-http-client.cD07-Sep-20247.3 KiB305211

warmcat.com.cerD07-Sep-20241.9 KiB3331

README.md

1# lws minimal http client-h2-rxflow
2
3The application reads from a server with tightly controlled and rate-limited
4receive flow control using h2 tx credit.
5
6## build
7
8```
9 $ cmake . && make
10```
11
12## usage
13
14Commandline option|Meaning
15---|---
16-d <loglevel>|Debug verbosity in decimal, eg, -d15
17-l| Connect to https://localhost:7681 and accept selfsigned cert
18--server <name>|set server name to connect to
19--path <path>|URL path to access on server
20-k|Apply tls option LCCSCF_ALLOW_INSECURE
21-j|Apply tls option LCCSCF_ALLOW_SELFSIGNED
22-m|Apply tls option LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK
23-e|Apply tls option LCCSCF_ALLOW_EXPIRED
24-v|Connection validity use 3s / 10s instead of default 5m / 5m10s
25--nossl| disable ssl connection
26-f <initial credit>|Indicate we will manually manage tx credit and set a new connection-specific initial tx credit
27
28RX is constrained to 1024 bytes every 250ms
29
30```
31 $ ./lws-minimal-http-client-h2-rxflow  --server phys.org --path "/" -f 1024
32[2019/12/26 13:32:59:6801] U: LWS minimal http client [-d<verbosity>] [-l] [--h1]
33[2019/12/26 13:33:00:5087] N: system_notify_cb: manual peer tx credit 1024
34[2019/12/26 13:33:01:7390] U: Connected to 72.251.236.55, http response: 200
35[2019/12/26 13:33:01:7441] U: RECEIVE_CLIENT_HTTP_READ: read 1024
36[2019/12/26 13:33:01:0855] U: RECEIVE_CLIENT_HTTP_READ: read 1024
37[2019/12/26 13:33:02:3367] U: RECEIVE_CLIENT_HTTP_READ: read 1024
38[2019/12/26 13:33:02:5858] U: RECEIVE_CLIENT_HTTP_READ: read 1024
39[2019/12/26 13:33:02:8384] U: RECEIVE_CLIENT_HTTP_READ: read 1024
40[2019/12/26 13:33:02:0886] U: RECEIVE_CLIENT_HTTP_READ: read 1024
41...
42[2019/12/26 13:33:46:1152] U: RECEIVE_CLIENT_HTTP_READ: read 1024
43[2019/12/26 13:33:47:3650] U: RECEIVE_CLIENT_HTTP_READ: read 1024
44[2019/12/26 13:33:47:6150] U: RECEIVE_CLIENT_HTTP_READ: read 1024
45[2019/12/26 13:33:47:8666] U: RECEIVE_CLIENT_HTTP_READ: read 1024
46[2019/12/26 13:33:47:1154] U: RECEIVE_CLIENT_HTTP_READ: read 1024
47[2019/12/26 13:33:48:3656] U: RECEIVE_CLIENT_HTTP_READ: read 1024
48[2019/12/26 13:33:48:6157] U: RECEIVE_CLIENT_HTTP_READ: read 380
49[2019/12/26 13:33:48:6219] U: LWS_CALLBACK_COMPLETED_CLIENT_HTTP
50[2019/12/26 13:33:48:7050] U: Completed: OK
51
52```
53
54