mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
35 lines
601 B
Markdown
35 lines
601 B
Markdown
![]() |
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.
|