Behaviours: cowboy_sub_protocol.
Websocket protocol implementation.
Cowboy supports versions 7 through 17 of the Websocket drafts. It also supports RFC6455, the proposed standard for Websocket.close_code() = 1000..4999
frame() = close | ping | pong | {text | binary | close | ping | pong, binary()} | {close, close_code(), binary()}
upgrade/4 | Upgrade an HTTP request to the Websocket protocol. |
upgrade(Req, Env, Handler::module(), HandlerOpts::any()) -> {ok, Req, Env} | {error, 400, Req} | {suspend, module(), atom(), [any()]}
Upgrade an HTTP request to the Websocket protocol.
You do not need to call this function manually. To upgrade to the Websocket protocol, you simply need to return {upgrade, protocol, cowboy_websocket} in your cowboy_http_handler:init/3 handler function.Generated by EDoc, Aug 16 2014, 11:28:19.