[Libwebsockets] Configuration questions.

Steve Calfee stevecalfee at gmail.com
Sun Nov 14 01:51:15 CET 2021


Seems most of my problems are sysadmin sorts of questions. In "conf" we
have

# these are the server global settings
# stuff related to vhosts should go in one
# file per vhost in ../conf.d/

{
  "global": {
   "uid": "48",
   "gid": "48",
   "interface": "eth0",
   "count-threads": "1",
   "server-string": "lwsws",
   "ws-pingpong-secs": "200",
   "init-ssl": "yes"
 }
}

What should be uid and gid? 48 seems random. I want to run as my local
user/group.

What I would really like is to use lwsws as my user, so no sudo copying etc
while debugging. When I start using "lwsws -c lwsws" the server does start
using .../lwsws as my config directory. Good.

But on my Mint (ubuntu) system the server data files are in
/usr/local/share/libwebsockets-test-server/. How can I put in my user
directory somewhere? Probably as cmake option? I would like them to be
freely r/w for my user/group.

I am creating my own protocol, so I copied protocol_lws_status.c. So far
ok; but this somewhat scary comment is in that file:

#define LWS_PLUGIN_PROTOCOL_LWS_STATUS \
{ \
"lws-status", \
callback_lws_status, \
sizeof(struct per_session_data__lws_status), \
512, /* rx buf size must be >= permessage-deflate rx size */ \
0, NULL, 0 \
}

#if !defined (LWS_PLUGIN_STATIC)

LWS_VISIBLE const struct lws_protocols lws_status_protocols[] = {
LWS_PLUGIN_PROTOCOL_LWS_STATUS
};

What are the rules for rx buf size? How do I know what or how big
permessage-deflate rx size is?

Enough questions for one email,

Thanks, Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20211113/3e45863d/attachment.htm>


More information about the Libwebsockets mailing list