blob: 7727ab7d44d4847acaf111b2b4a33129808ece0a [file] [log] [blame]
Andy Greenb2149772010-10-31 13:15:56 +00001Using test-server as a quickstart
2---------------------------------
3
Andy Green3c974692010-11-08 17:04:09 +00004$ ./configure --enable-openssl
Andy Green05a0a7b2010-10-31 17:51:39 +00005$ make
Andy Green7310e9c2010-11-01 09:12:17 +00006$ sudo make install
7$ libwebsockets-test-server
Andy Greenb2149772010-10-31 13:15:56 +00008
9should be enough to get a test server listening on port 7861.
10
11If you point your browser (eg, Chrome) to
12
13 http://127.0.0.1:7681
14
Andy Green3c974692010-11-08 17:04:09 +000015It will fetch a script in the form of test.html, and then run the
Andy Green7310e9c2010-11-01 09:12:17 +000016script in there on the browser to open a websocket connection.
17Incrementing numbers should appear in the browser display.
Andy Greenb2149772010-10-31 13:15:56 +000018
Andy Green3c974692010-11-08 17:04:09 +000019To test it using SSL/WSS, just run the test server with
20
21$ libwebsockets-test-server --ssl
22
23and use the URL
24
25 https://127.0.0.1:7681
26
27The connection will be entirely encrypted using some generated
28certificates that your browser will not accept, since they are
29not signed by any real Certificate Authority. Just accept the
30certificates in the browser and the connection will proceed
31in first https and then websocket wss, acting exactly the
32same.
33
Andy Greenb2149772010-10-31 13:15:56 +000034test-server.c is all that is needed to use libwebsockets for
35serving both the script html over http and websockets.
36
Andy Green3c974692010-11-08 17:04:09 +0000372010-11-08 Andy Green <andy@warmcat.com>
Andy Greenb2149772010-10-31 13:15:56 +000038