aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-10-02 18:06:06 +0200
committerLoïc Hoguin <[email protected]>2017-10-02 18:06:06 +0200
commitb2bd9ccfb582213909129b6a54514b968856168a (patch)
tree15f179f43438b75f065577262fbfb2b20d88907d /doc
parent9317751cb314328340fede4cb780562b77afe8c9 (diff)
downloadcowboy-b2bd9ccfb582213909129b6a54514b968856168a.tar.gz
cowboy-b2bd9ccfb582213909129b6a54514b968856168a.tar.bz2
cowboy-b2bd9ccfb582213909129b6a54514b968856168a.zip
Document cow_ws:frame in Cowboy for now
Diffstat (limited to 'doc')
-rw-r--r--doc/src/manual/cowboy_websocket.asciidoc20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/manual/cowboy_websocket.asciidoc b/doc/src/manual/cowboy_websocket.asciidoc
index 2421ae8..40864c5 100644
--- a/doc/src/manual/cowboy_websocket.asciidoc
+++ b/doc/src/manual/cowboy_websocket.asciidoc
@@ -32,7 +32,7 @@ PartialReq :: map()
State :: any()
Opts :: cowboy_websocket:opts()
InFrame :: {text | binary | ping | pong, binary()}
-OutFrame :: cow_ws:frame()
+OutFrame :: cow_ws:frame() %% see types below
Info :: any()
CallResult :: {ok, State}
@@ -128,6 +128,24 @@ timeout::
== Types
+==== cow_ws:frame()
+
+[source,erlang]
+----
+frame() :: {text, iodata()}
+ | {binary, iodata()}
+ | ping | {ping, iodata()}
+ | pong | {pong, iodata()}
+ | close | {close, iodata()} | {close, close_code(), iodata()}
+
+close_code() :: 1000..1003 | 1006..1011 | 3000..4999
+----
+
+Websocket frames that can be sent as a response.
+
+Note that there is no need to send pong frames back as
+Cowboy does it automatically for you.
+
=== opts()
[source,erlang]