From 666c59bc422172562673916ed3a8a796c4f9fbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 17 May 2013 13:13:27 +0200 Subject: Add the Cowboy Function Reference The manual details every stable public functions of Cowboy. --- manual/cowboy_websocket.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 manual/cowboy_websocket.md (limited to 'manual/cowboy_websocket.md') diff --git a/manual/cowboy_websocket.md b/manual/cowboy_websocket.md new file mode 100644 index 0000000..ae3ca1b --- /dev/null +++ b/manual/cowboy_websocket.md @@ -0,0 +1,34 @@ +cowboy_websocket +================ + +The `cowboy_websocket` module implements the Websocket protocol. + +The callbacks for websocket handlers are defined in the manual +for the `cowboy_websocket_handler` behaviour. + +Types +----- + +### close_code() = 1000..4999 + +> Reason for closing the connection. + +### frame() = close | ping | pong + | {text | binary | close | ping | pong, iodata()} + | {close, close_code(), iodata()} + +> Frames that can be sent to the client. + +Meta values +----------- + +### websocket_version + +> Type: 7 | 8 | 13 +> +> The version of the Websocket protocol being used. + +Exports +------- + +None. -- cgit v1.2.3