libwebsockets/plugins
Andy Green 2700d1c0c3 protocol_client_loopback_test
This is used to confirm that SSL client connections can coexist with
a vhost doing serving.

To set it up,

/*
 * This is a bit fiddly...
 *
 * 0) If you want the wss:// test to work, make sure the vhost is marked with
 *    enable-client-ssl if using lwsws, or call lws_init_vhost_client_ssl() on
 *    the vhost if you're doing it by hand.
 *
 * 1) enable the protocol on a vhost
 *
 *      "ws-protocols": [{
 *     "client-loopback-test": {
 *      "status": "ok"
 *     },  ...
 *
 *     the vhost should listen on 80 (ws://) or 443 (wss://)
 *
 * 2) mount the http part of the test one level down on the same vhost, eg
 *   {
 *      "mountpoint": "/c",
 *      "origin": "callback://client-loopback-test"
 *   }
 *
 * 3) Use a browser to visit the mountpoint with a URI attached for looping
 *    back, eg, if testing on localhost
 *
 *    http://localhost/c/ws://localhost
 *    https://localhost/c/wss://localhost
 *
 * 4) The HTTP part of this test protocol will try to do the requested
 *    ws client connection, to the same test protocol on the same
 *    server.
 */

Results should look like this

lwsws[29938]: client connection to localhost:443 with ssl: 1 started
lwsws[29938]: server part: LWS_CALLBACK_ESTABLISHED
lwsws[29938]: checking client ext permessage-deflate
lwsws[29938]: instantiating client ext permessage-deflate
lwsws[29938]: Client connection established
lwsws[29938]: Client connection received 7 from server 'Made it'

Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-12 21:14:13 +08:00
..
lwsws-logo.png http cache policy 2016-04-22 08:53:49 +08:00
protocol_client_loopback_test.c protocol_client_loopback_test 2016-05-12 21:14:13 +08:00
protocol_dumb_increment.c plugin lws server status 2016-04-18 20:05:43 +08:00
protocol_lws_mirror.c polarssl implementation 2016-04-18 20:05:43 +08:00
protocol_lws_server_status.c per vhost options struct explicitly const 2016-05-02 06:01:59 +08:00
protocol_lws_status.c plugin lws server status 2016-04-18 20:05:43 +08:00
protocol_post_demo.c add protocol plugin for post demo 2016-05-09 10:05:43 +08:00
server-status.html server status add getloadavg and lib version and more css 2016-04-26 14:54:09 +08:00