protocol plugins set default
[platform/upstream/libwebsockets.git] / README.lwsws.md
index 63b0266..9d6c82a 100644 (file)
@@ -146,7 +146,7 @@ Vhosts can select which plugins they want to offer and give them per-vhost setti
 
 ```    
      "ws-protocols": [{
-       "warmcat,timezoom": {
+       "warmcat-timezoom": {
          "status": "ok"
        }
      }]
@@ -157,6 +157,19 @@ The "x":"y" parameters like "status":"ok" are made available to the protocol dur
 LWS_CALLBACK_PROTOCOL_INIT (@in is a pointer to a linked list of struct lws_protocol_vhost_options
 containing the name and value pointers).
 
+To indicate that a protocol should be used when no Protocol: header is sent
+by the client, you can use "default": "1"
+
+```    
+     "ws-protocols": [{
+       "warmcat-timezoom": {
+         "status": "ok",
+         "default": "1"
+       }
+     }]
+
+```
+
 
 Other vhost options
 -------------------