Browse files

Add doc.

Signed-off-by: François de Metz <>
  • Loading branch information...
1 parent 8c31b07 commit 2a91dd124c75b516e458ae172949ed284e7e4c9c @francois2metz committed Mar 16, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 doc/yaws.tex
10 doc/yaws.tex
@@ -2738,6 +2738,9 @@ \section{WebSocket Callback Modules}
\\ \verb+handle_message/2+ callback function, depending on whether
it's a basic or advanced callback module.
+To be notified when the connection have been upgraded, you can implement,
+ \verb+handle_open/1+ callback.
\subsection{Basic Callback Modules}
The argument passed to \verb+handle_message/1+ callback function takes
@@ -2784,9 +2787,10 @@ \subsection{Basic Callback Modules}
To inform \Yaws\ of the details of your callback module, return
-\verb+{websocket, CallbackModule, Options}+ from your \verb+out/1+
+\verb+{websocket, CallbackModule, Options, Params}+ from your \verb+out/1+
function, where \verb+CallbackModule+ is the name of your callback
-module and \verb+Options+ is a list of options. The following options
+module, \verb+Options+ is a list of options and \verb+Params+ is an arbitrary
+param to be passed to \verb+handle_open/1+. The following options
are available:
@@ -2823,7 +2827,7 @@ \subsection{Advanced Callback Modules}
To indicate an advanced callback module, include
\verb+{callback, {advanced, InitialState}}+ in the \\ \verb+Options+
-list when you return \verb+{websocket, CallbackModule, Options}+ from
+list when you return \verb+{websocket, CallbackModule, Options, Params}+ from
your \verb+out/1+ function, as described above.
The arguments to the \verb+handle_message/2+ callback

0 comments on commit 2a91dd1

Please sign in to comment.