blob: 2f14e174d5025c5bc85da9a3f2eecd680ba091de [file] [log] [blame]
Using test-server as a quickstart
---------------------------------
For a Fedora x86_86 box, the following config line was
needed:
./configure --prefix=/usr --libdir=/usr/lib64 --enable-openssl
otherwise if /usr/local/... and /usr/local/lib are OK then...
$ ./configure --enable-openssl
$ make
$ sudo make install
$ libwebsockets-test-server
should be enough to get a test server listening on port 7861.
If you point your browser (eg, Chrome) to
http://127.0.0.1:7681
It will fetch a script in the form of test.html, and then run the
script in there on the browser to open a websocket connection.
Incrementing numbers should appear in the browser display.
To test it using SSL/WSS, just run the test server with
$ libwebsockets-test-server --ssl
and use the URL
https://127.0.0.1:7681
The connection will be entirely encrypted using some generated
certificates that your browser will not accept, since they are
not signed by any real Certificate Authority. Just accept the
certificates in the browser and the connection will proceed
in first https and then websocket wss, acting exactly the
same.
test-server.c is all that is needed to use libwebsockets for
serving both the script html over http and websockets.
2010-11-08 Andy Green <andy@warmcat.com>