mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
docs: switch to use main
This commit is contained in:
parent
1ee190304e
commit
44e860642b
22 changed files with 29 additions and 50 deletions
|
@ -545,7 +545,7 @@ All "foreign" cross-built binaries are sent into `/tmp/cross` so they cannot be
|
||||||
|
|
||||||
1) `cd /tmp`
|
1) `cd /tmp`
|
||||||
|
|
||||||
2) `wget -O mytoolchainfile https://raw.githubusercontent.com/warmcat/libwebsockets/master/contrib/cross-arm-linux-gnueabihf.cmake`
|
2) `wget -O mytoolchainfile https://raw.githubusercontent.com/warmcat/libwebsockets/main/contrib/cross-arm-linux-gnueabihf.cmake`
|
||||||
|
|
||||||
3) Edit `/tmp/mytoolchainfile` adapting `CROSS_PATH`, `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` to reflect your toolchain install dir and path to your toolchain C and C++ compilers respectively. For my case:
|
3) Edit `/tmp/mytoolchainfile` adapting `CROSS_PATH`, `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` to reflect your toolchain install dir and path to your toolchain C and C++ compilers respectively. For my case:
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,15 @@ Older versions of lws don't attract any new work after they are released
|
||||||
(see [the release policy](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.release-policy.md) for details);
|
(see [the release policy](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.release-policy.md) for details);
|
||||||
for a while they will get backported bugfixes but that's it.
|
for a while they will get backported bugfixes but that's it.
|
||||||
|
|
||||||
All new work and bugfixes happen on master branch.
|
All new work and bugfixes happen on `main` branch.
|
||||||
|
|
||||||
Old, old versions may be convenient for you to use for some reason. But unless
|
Old, old versions may be convenient for you to use for some reason. But unless
|
||||||
you pay for support or have contributed work to lws so we feel we owe you some
|
you pay for support or have contributed work to lws so we feel we owe you some
|
||||||
consideration, nobody else has any reason to particularly care about solving
|
consideration, nobody else has any reason to particularly care about solving
|
||||||
issues on ancient versions. Whereas if the problem exists on master, and can be
|
issues on ancient versions. Whereas if the problem exists on `main`, and can be
|
||||||
reproduced by developers, it usually gets attention, often immediately.
|
reproduced by developers, it usually gets attention, often immediately.
|
||||||
|
|
||||||
If the problem doesn't exist on master, you can either use master or check also
|
If the problem doesn't exist on `main`, you can either use `main` or check also
|
||||||
the -stable branch of the last released version to see if it was already solved
|
the -stable branch of the last released version to see if it was already solved
|
||||||
there.
|
there.
|
||||||
|
|
||||||
|
|
|
@ -30,16 +30,16 @@ runtime tests, so if it is passing CI as it usually is then it's probably in
|
||||||
usable shape. See "Why no history on development" below for why it's managed like
|
usable shape. See "Why no history on development" below for why it's managed like
|
||||||
that.
|
that.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
If you have patches (you are a hero) they should be targeted at master.
|
If you have patches (you are a hero) they should be targeted at `main`.
|
||||||
|
|
||||||
To follow such a branch, `git pull` is the wrong tool... the starting point
|
To follow such a branch, `git pull` is the wrong tool... the starting point
|
||||||
of what you currently have may no longer exist remotely due to rearranging the
|
of what you currently have may no longer exist remotely due to rearranging the
|
||||||
patches there. Instead use a flow like this:
|
patches there. Instead use a flow like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git fetch https://libwebsockets.org/repo/libwebsockets +master:m && git reset --hard m
|
$ git fetch https://libwebsockets.org/repo/libwebsockets +main:m && git reset --hard m
|
||||||
```
|
```
|
||||||
|
|
||||||
This fetches current remote development branch into local branch `m`, and then forces your
|
This fetches current remote development branch into local branch `m`, and then forces your
|
||||||
|
@ -83,7 +83,7 @@ madness.
|
||||||
When new stable releases are made, the soname is bumped reflecting the API is
|
When new stable releases are made, the soname is bumped reflecting the API is
|
||||||
different than that of previous versions.
|
different than that of previous versions.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
If there is something you need in a later lws version that is not backported,
|
If there is something you need in a later lws version that is not backported,
|
||||||
you need to either backport it yourself or use a later lws version.
|
you need to either backport it yourself or use a later lws version.
|
||||||
|
|
|
@ -81,7 +81,7 @@ background and return immediately. In this daemonized mode all stderr is
|
||||||
disabled and logging goes only to syslog, eg, `/var/log/messages` or similar.
|
disabled and logging goes only to syslog, eg, `/var/log/messages` or similar.
|
||||||
|
|
||||||
The server maintains a lockfile at `/tmp/.lwsts-lock` that contains the pid
|
The server maintains a lockfile at `/tmp/.lwsts-lock` that contains the pid
|
||||||
of the master process, and deletes this file when the master process
|
of the parent process, and deletes this file when the parent process
|
||||||
terminates.
|
terminates.
|
||||||
|
|
||||||
To stop the daemon, do
|
To stop the daemon, do
|
||||||
|
|
|
@ -7,6 +7,6 @@ direct email.
|
||||||
## Procedure for announcing vulnerability fixes
|
## Procedure for announcing vulnerability fixes
|
||||||
|
|
||||||
The problem and fixed versions will be announced on the
|
The problem and fixed versions will be announced on the
|
||||||
libwebsockets mailing list and a note added to the master
|
libwebsockets mailing list and a note added to the `main`
|
||||||
README.md.
|
README.md.
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
** What version of lws **
|
** What version of lws **
|
||||||
|
|
||||||
"vx.y.z" or "01234567 from master thismorning" etc
|
"vx.y.z" or "01234567 from `main` thismorning" etc
|
||||||
|
|
||||||
If it's much older than last stable release, we will likely suggest you try that or master.
|
If it's much older than last stable release, we will likely suggest you try that
|
||||||
|
or `main`.
|
||||||
|
|
||||||
** What platform and arch? **
|
** What platform and arch? **
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ send_hs:
|
||||||
* for anybody on his client transaction queue that is in
|
* for anybody on his client transaction queue that is in
|
||||||
* LRS_H1C_ISSUE_HANDSHAKE2, and let them write.
|
* LRS_H1C_ISSUE_HANDSHAKE2, and let them write.
|
||||||
*
|
*
|
||||||
* If we are trying to do this too early, before the master
|
* If we are trying to do this too early, before the network
|
||||||
* connection has written his own headers, then it will just
|
* connection has written his own headers, then it will just
|
||||||
* wait in the queue until it's possible to send them.
|
* wait in the queue until it's possible to send them.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -336,7 +336,7 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason,
|
||||||
// if (wsi->parent->child_list == wsi && !wsi->sibling_list)
|
// if (wsi->parent->child_list == wsi && !wsi->sibling_list)
|
||||||
// lws_cgi_remove_and_kill(wsi->parent);
|
// lws_cgi_remove_and_kill(wsi->parent);
|
||||||
|
|
||||||
/* end the binding between us and master */
|
/* end the binding between us and network connection */
|
||||||
if (wsi->parent->http.cgi && wsi->parent->http.cgi->lsp)
|
if (wsi->parent->http.cgi && wsi->parent->http.cgi->lsp)
|
||||||
wsi->parent->http.cgi->lsp->stdwsi[(int)wsi->lsp_channel] =
|
wsi->parent->http.cgi->lsp->stdwsi[(int)wsi->lsp_channel] =
|
||||||
NULL;
|
NULL;
|
||||||
|
|
|
@ -126,8 +126,8 @@ lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd)
|
||||||
|
|
||||||
#ifdef LWS_WITH_CGI
|
#ifdef LWS_WITH_CGI
|
||||||
/*
|
/*
|
||||||
* A cgi master's wire protocol remains h1 or h2. He is just getting
|
* A cgi connection's wire protocol remains h1 or h2. He is just
|
||||||
* his data from his child cgis.
|
* getting his data from his child cgis.
|
||||||
*/
|
*/
|
||||||
if (wsi->http.cgi) {
|
if (wsi->http.cgi) {
|
||||||
/* also one shot */
|
/* also one shot */
|
||||||
|
|
|
@ -124,7 +124,7 @@ Peak alloc|78MiB
|
||||||
Serialization time|202ms
|
Serialization time|202ms
|
||||||
Trie File size|347MiB
|
Trie File size|347MiB
|
||||||
|
|
||||||
To index libwebsockets master under the same conditions:
|
To index libwebsockets main branch under the same conditions:
|
||||||
|
|
||||||
Name|Value
|
Name|Value
|
||||||
---|---
|
---|---
|
||||||
|
|
|
@ -90,7 +90,7 @@ lws_plat_init(struct lws_context *context,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* master context has the global fd lookup array */
|
/* context has the global fd lookup array */
|
||||||
context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
|
context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
|
||||||
context->max_fds, "esp32 lws_lookup");
|
context->max_fds, "esp32 lws_lookup");
|
||||||
if (context->lws_lookup == NULL) {
|
if (context->lws_lookup == NULL) {
|
||||||
|
|
|
@ -198,7 +198,7 @@ lws_plat_init(struct lws_context *context,
|
||||||
const struct lws_context_creation_info *info)
|
const struct lws_context_creation_info *info)
|
||||||
{
|
{
|
||||||
#if defined(LWS_WITH_NETWORK)
|
#if defined(LWS_WITH_NETWORK)
|
||||||
/* master context has the global fd lookup array */
|
/* context has the global fd lookup array */
|
||||||
context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
|
context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
|
||||||
context->max_fds, "lws_lookup");
|
context->max_fds, "lws_lookup");
|
||||||
if (context->lws_lookup == NULL) {
|
if (context->lws_lookup == NULL) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ lws_plat_init(struct lws_context *context,
|
||||||
int fd;
|
int fd;
|
||||||
#if defined(LWS_WITH_NETWORK)
|
#if defined(LWS_WITH_NETWORK)
|
||||||
/*
|
/*
|
||||||
* master context has the process-global fd lookup array. This can be
|
* context has the process-global fd lookup array. This can be
|
||||||
* done two different ways now; one or the other is done depending on if
|
* done two different ways now; one or the other is done depending on if
|
||||||
* info->fd_limit_per_thread was snonzero
|
* info->fd_limit_per_thread was snonzero
|
||||||
*
|
*
|
||||||
|
|
|
@ -118,7 +118,7 @@ lws_cgi(struct lws *wsi, const char * const *exec_array,
|
||||||
int n, m = 0, i, uritok = -1, c;
|
int n, m = 0, i, uritok = -1, c;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* give the master wsi a cgi struct
|
* give the cgi stream wsi a cgi struct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wsi->http.cgi = lws_zalloc(sizeof(*wsi->http.cgi), "new cgi");
|
wsi->http.cgi = lws_zalloc(sizeof(*wsi->http.cgi), "new cgi");
|
||||||
|
|
|
@ -50,7 +50,7 @@ enum {
|
||||||
|
|
||||||
struct lws;
|
struct lws;
|
||||||
|
|
||||||
/* wsi who is master of the cgi points to an lws_cgi */
|
/* wsi who is owns the cgi points to an lws_cgi */
|
||||||
|
|
||||||
struct lws_cgi {
|
struct lws_cgi {
|
||||||
struct lws_cgi *cgi_list;
|
struct lws_cgi *cgi_list;
|
||||||
|
|
|
@ -1461,7 +1461,7 @@ lws_h2_parse_end_of_frame(struct lws *wsi)
|
||||||
h2n->peer_set.s[H2SET_INITIAL_WINDOW_SIZE];
|
h2n->peer_set.s[H2SET_INITIAL_WINDOW_SIZE];
|
||||||
|
|
||||||
lwsl_info("%s: initial tx credit for us to "
|
lwsl_info("%s: initial tx credit for us to "
|
||||||
"write on master %p: %d\n", __func__,
|
"write on nwsi %p: %d\n", __func__,
|
||||||
wsi, (int)wsi->txc.tx_cr);
|
wsi, (int)wsi->txc.tx_cr);
|
||||||
wsi->h2.initialized = 1;
|
wsi->h2.initialized = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,7 @@ start_ws_handshake:
|
||||||
* negotiated "h2" or connected as clear text
|
* negotiated "h2" or connected as clear text
|
||||||
* with http/2 prior knowledge.
|
* with http/2 prior knowledge.
|
||||||
*
|
*
|
||||||
* So this is it, we are an h2 master client connection
|
* So this is it, we are an h2 nwsi client connection
|
||||||
* now, not an h1 client connection.
|
* now, not an h1 client connection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ struct _lws_http_mode_related {
|
||||||
struct lws_access_log access_log;
|
struct lws_access_log access_log;
|
||||||
#endif
|
#endif
|
||||||
#ifdef LWS_WITH_CGI
|
#ifdef LWS_WITH_CGI
|
||||||
struct lws_cgi *cgi; /* wsi being cgi master have one of these */
|
struct lws_cgi *cgi; /* wsi being cgi stream have one of these */
|
||||||
#endif
|
#endif
|
||||||
#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
|
#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
|
||||||
struct lws_compression_support *lcs;
|
struct lws_compression_support *lcs;
|
||||||
|
|
|
@ -273,28 +273,6 @@ lws_mqtt_client_socket_service(struct lws *wsi, struct lws_pollfd *pollfd,
|
||||||
lws_det_lat_cb(wsi->a.context, &wsi->detlat);
|
lws_det_lat_cb(wsi->a.context, &wsi->detlat);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
|
||||||
if (wsi->client_h2_alpn) {
|
|
||||||
/*
|
|
||||||
* We connected to the server and set up tls, and
|
|
||||||
* negotiated "h2".
|
|
||||||
*
|
|
||||||
* So this is it, we are an h2 master client connection
|
|
||||||
* now, not an h1 client connection.
|
|
||||||
*/
|
|
||||||
#if defined(LWS_WITH_TLS)
|
|
||||||
lws_tls_server_conn_alpn(wsi);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* send the H2 preface to legitimize the connection */
|
|
||||||
if (lws_h2_issue_preface(wsi)) {
|
|
||||||
cce = "error sending h2 preface";
|
|
||||||
goto bail3;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* fallthru */
|
/* fallthru */
|
||||||
|
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ payload_ff:
|
||||||
*
|
*
|
||||||
* The reason is he may set metadata in CREATING, and
|
* The reason is he may set metadata in CREATING, and
|
||||||
* we will try to do writeables to sync the stream to
|
* we will try to do writeables to sync the stream to
|
||||||
* master and ultimately bring up the onward connection now
|
* proxy and ultimately bring up the onward connection
|
||||||
* now we are in LOCAL_CONNECTED. We need to do the
|
* now we are in LOCAL_CONNECTED. We need to do the
|
||||||
* CREATING now so we'll know the metadata to sync.
|
* CREATING now so we'll know the metadata to sync.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -205,7 +205,7 @@ lws_client_create_tls(struct lws *wsi, const char **pcce, int do_c1)
|
||||||
* We connected to the server and set up tls, and
|
* We connected to the server and set up tls, and
|
||||||
* negotiated "h2".
|
* negotiated "h2".
|
||||||
*
|
*
|
||||||
* So this is it, we are an h2 master client connection
|
* So this is it, we are an h2 nwsi client connection
|
||||||
* now, not an h1 client connection.
|
* now, not an h1 client connection.
|
||||||
*/
|
*/
|
||||||
#if defined(LWS_WITH_TLS)
|
#if defined(LWS_WITH_TLS)
|
||||||
|
|
|
@ -220,7 +220,7 @@ reload_handler(int signum)
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
case SIGKILL:
|
case SIGKILL:
|
||||||
fprintf(stderr, "master process waiting 2s...\n");
|
fprintf(stderr, "parent process waiting 2s...\n");
|
||||||
sleep(2); /* give children a chance to deal with the signal */
|
sleep(2); /* give children a chance to deal with the signal */
|
||||||
fprintf(stderr, "killing service processes\n");
|
fprintf(stderr, "killing service processes\n");
|
||||||
for (m = 0; m < (int)LWS_ARRAY_SIZE(pids); m++)
|
for (m = 0; m < (int)LWS_ARRAY_SIZE(pids); m++)
|
||||||
|
|
Loading…
Add table
Reference in a new issue