mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Document cow_ws:frame in Cowboy for now
This commit is contained in:
parent
9317751cb3
commit
b2bd9ccfb5
1 changed files with 19 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue