no protocol usage inprove docs
authorAndy Green <andy.green@linaro.org>
Thu, 7 Aug 2014 08:52:15 +0000 (16:52 +0800)
committerAndy Green <andy.green@linaro.org>
Thu, 7 Aug 2014 08:52:15 +0000 (16:52 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/client-handshake.c
lib/libwebsockets.h

index e25c368..17d77a5 100644 (file)
@@ -284,7 +284,8 @@ failed:
  * @origin:    Socket origin name
  * @protocol:  Comma-separated list of protocols being asked for from
  *             the server, or just one.  The server will pick the one it
- *             likes best.
+ *             likes best.  If you don't want to specify a protocol, which is
+ *             legal, use NULL here.
  * @ietf_version_or_minus_one: -1 to ask to connect using the default, latest
  *             protocol supported, or the specific protocol ordinal
  *
index a3ed207..203c54e 100644 (file)
@@ -839,7 +839,7 @@ typedef int (extension_callback_function)(struct libwebsocket_context *context,
  * struct libwebsocket_protocols -     List of protocols and handlers server
  *                                     supports.
  * @name:      Protocol name that must match the one given in the client
- *             Javascript new WebSocket(url, 'protocol') name
+ *             Javascript new WebSocket(url, 'protocol') name.
  * @callback:  The service callback used for this protocol.  It allows the
  *             service action for an entire protocol to be encapsulated in
  *             the protocol-specific callback
@@ -870,6 +870,10 @@ typedef int (extension_callback_function)(struct libwebsocket_context *context,
  *     This structure represents one protocol supported by the server.  An
  *     array of these structures is passed to libwebsocket_create_server()
  *     allows as many protocols as you like to be handled by one server.
+ *
+ *     The first protocol given has its callback used for user callbacks when
+ *     there is no agreed protocol name, that's true during HTTP part of the
+ *     connection and true if the client did not send a Protocol: header.
  */
 
 struct libwebsocket_protocols {