0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00

Fix more documentation todos

I have decided not to include a manual page for
cowboy_stream_h at this point because it clashes
with the cowboy_stream manual page. This decision
will be revisited in the future.
This commit is contained in:
Loïc Hoguin 2017-09-04 14:33:44 +02:00
parent 47aa0097ed
commit 58e9e76814
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
14 changed files with 225 additions and 55 deletions

View file

@ -25,9 +25,10 @@ websocket_init(State) -> CallResult %% optional
websocket_handle(InFrame, State) -> CallResult
websocket_info(Info, State) -> CallResult
terminate(Reason, undefined, State) -> ok %% optional
terminate(Reason, PartialReq, State) -> ok %% optional
Req :: cowboy_req:req()
PartialReq :: map()
State :: any()
Opts :: cowboy_websocket:opts()
InFrame :: {text | binary | ping | pong, binary()}
@ -74,9 +75,8 @@ tuple).
The optional `terminate/3` callback will ultimately be called
with the reason for the termination of the connection. This
callback is common to all handlers. Note that Websocket has
no concept of requests so it sets the second argument to
undefined.
callback is common to all handlers. Note that Websocket will
not provide the full Req object by default, to save memory.
Cowboy will terminate the process right after closing the
Websocket connection. This means that there is no need to