Imported Upstream version 3.2
[platform/upstream/libwebsockets.git] / minimal-examples / http-server / minimal-http-server-eventlib-smp / README.md
1 # lws minimal http server eventlib
2
3 WARNING: this is under development, it's not stable.
4
5 This demonstrates a minimal http server that can use any of the event libraries
6
7 Commandline option|Meaning
8 ---|---
9 -d <loglevel>|Debug verbosity in decimal, eg, -d15
10 -t <threads>|Number of threads to use.
11 --uv|Use the libuv event library (lws must have been configured with `-DLWS_WITH_LIBUV=1`)
12 --event|Use the libevent library (lws must have been configured with `-DLWS_WITH_LIBEVENT=1`)
13 --ev|Use the libev event library (lws must have been configured with `-DLWS_WITH_LIBEV=1`)
14
15 ## build
16
17 lilbwebsockets must have been built with `LWS_MAX_SMP` greater than 1 to use
18 multiple threads.
19
20 ```
21  $ cmake . && make
22 ```
23
24 ## usage
25
26 ```
27  $ ./lws-minimal-http-server-eventlib-smp
28 [2018/03/04 09:30:02:7986] USER: LWS minimal http server-eventlib | visit http://localhost:7681
29 [2018/03/04 09:30:02:7986] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 on
30 ```
31
32 Visit http://localhost:7681
33