1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/test-server
Andy Green d526c50c22 introduce vhosts
This patch splits out some lws_context members into a new lws_vhost struct.

 - ssl state and options per vhost
 - SSL_CTX for serving and client per vhost
 - protocols[] per vhost
 - extensions[] per vhost

lws_context maintains a linked list of lws_vhosts.

The same lws_context_creation_info struct is used to regulate both the
context creation and to create vhosts: for backward compatibility if you
didn't provide the new LWS_SERVER_OPTION_EXPLICIT_VHOSTS option, then
a default vhost is created at context creation time using the same info
data as the context itself.

If you will have multiple vhosts though, you should give the
LWS_SERVER_OPTION_EXPLICIT_VHOSTS option at context creation time,
create the context first and then the vhosts afterwards using

  lws_create_vhost(contest, &info);

Although there is a lot of housekeeping to implement this change, there
is almost no additional overhead if you don't use multiple vhosts and
very little api impact (no changes to test apps).

Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-28 10:15:25 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
attack.sh attack.sh add check for nonexistant file processing 2016-02-20 08:12:31 +08:00
favicon.ico refactor-into-dirs.patch 2010-11-01 09:12:17 +00:00
fuzxy.c Don't include <sys/cdefs.h> for NetBSD 2016-02-27 10:30:59 +08:00
leaf.jpg add by hand http send example 2013-02-14 23:24:07 +08:00
libwebsockets-test-server.service test server example systemd service file 2016-02-19 12:46:36 +08:00
libwebsockets.org-logo.png add libwebsockets.org logo to share 2013-01-16 10:00:39 +08:00
lws-cgi-test.sh cgi header processing 2016-03-19 17:21:45 +08:00
test-client.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-echo.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-fraggle.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-ping.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-server-dumb-increment.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-echogen.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-http.c cgi env 2016-03-21 15:17:33 +08:00
test-server-libev.c Fix some typos. 2016-02-16 21:47:56 +08:00
test-server-libuv.c libuv: sigint API cleanup 2016-03-23 07:46:39 +08:00
test-server-mirror.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-pthreads.c clang fixes 1 2016-03-15 21:49:32 +08:00
test-server-status.c test server add lws_status 2016-02-21 11:09:40 +08:00
test-server.c introduce vhosts 2016-03-28 10:15:25 +08:00
test-server.h cgi env 2016-03-21 15:17:33 +08:00
test.html test server add lws_status 2016-02-21 11:09:40 +08:00