1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
Commit graph

13 commits

Author SHA1 Message Date
Andy Green
c4327e7f8e ss: reset retry count for explicit connection request
This differentiates between client connections for retry / writeable requests
and explicit lws_ss_client_connect() api calls.  The former effectively uses
retry / backoff, and the latter resets the retry / backoff.

If you receive ALL_RETRIES_FAILED due to the retry policy, you can do whatever
you need to do there and call lws_ss_client_connect() to try to connect again
with a fresh, reset retry / backoff state.
2020-06-26 11:33:46 +01:00
Jed Lu
44ead6a42c ss: http: if not retrying move to idle state 2020-06-19 19:22:37 +01:00
Jed Lu
685d9cb690 ss: http: allow rideshare to gate EOM
When rideshare is in use, the scope of the EOM is the rideshare section.
2020-06-01 16:17:06 +01:00
Jed Lu
f1f7512e8d ss: Support content-length on PUT as well as PUSH 2020-05-27 14:00:52 +01:00
Andy Green
2a5b54d0a6 ss: make sure to use LWS_WRITE_HTTP_FINAL with SS EOM flag
When most of ss-h2 was combined into ss-h1 during development, the h2 difference
about needing HTTP_FINAL to signal h2 FIN flag was accidentally dropped.  In
many cases the peer can infer it, from, eg, content-length reached.  But we need
to replace explicitly doing it to cover all cases.
2020-05-11 15:11:11 +01:00
Andy Green
8221450b20 ss: support no tls in policy 2020-05-06 15:27:59 +01:00
Andy Green
85dc0883a2 ss: handle rx and tx return values properly
You can disconnect the stream by returning -1 from tx().  You can
give up your chance to send anything by returning 1 from tx().
Returning 0 sends `*len` amount of the provided buffer.

Returning <0 from rx() also disconnects the stream.
2020-05-04 14:36:39 +01:00
Andy Green
457bc20d1b ss: reduce logging of unknown streamtypes
There are a few automatic things that look for streamtypes that may or
may not exist now

 - captive_portal_detect
 - fetch_policy
 - api_amazon_com_auth

logging them as notice every startup is pretty intrusive, change to info.
2020-03-19 14:37:22 +00:00
Andy Green
cf2ed9f758 ss: use system trust store if none given in policy
For general OpenSSL case, we leave connection validity to system trust
store bundle to decide; even for mbedtls it may have been passed a
bundle externally and we don't want to have to list the x.509 stack
explicitly for a server we don't have any control over.

Instead of erroring out, allow the case no trust store is specified,
just use vhost[0] and let the system trust store decide if it likes
the server's cert or not.


No ABI change.
2020-03-16 16:59:17 +00:00
Andy Green
84f8bdc3d8 ss: support metadata string expansion in endpoint string
This lets you set metadata symbols exposed by the streamtype policy
into the endpoint address.

No ABI change
2020-03-16 16:56:11 +00:00
Andy Green
28c0e51cd6 client: unify post tls accept handling 2020-03-07 20:20:07 +00:00
Andy Green
9695e23c00 ss: mqtt: add will and other sundries to policy
Replace the hacked-in constants with policy entries for sundry
MQTT features, and add to the policy readme.
2020-03-04 12:17:49 +00:00
Andy Green
28ce32af64 client: secure streams
Secure Streams is an optional layer on top of lws that separates policy
like endpoint selection and tls cert validation into a device JSON
policy document.

Code that wants to open a client connection just specifies a streamtype name,
and no longer deals with details like the endpoint, the protocol (!) or anything
else other than payloads and optionally generic metadata; the JSON policy
contains all the details for each streamtype.  h1, h2, ws and mqtt client
connections are supported.

Logical secure streams outlive any particular connection and supports "nailed-up"
connectivity regardless of underlying connection stability.
2020-03-04 12:17:49 +00:00