Spell.Transport.WebSocket
The Spell.Transport.WebSocket module implements a webosocket transport.
By default the websocket will use port 443. Use new/2 to set the
port when creating a new websocket transport.
Summary↑
| connect(serializer, options) | Negotiate a WebSocket connection |
| init(arg1, conn_state) | |
| send_message(transport, raw_message) | Callback implementation for |
| websocket_handle(arg1, conn_state, state) | |
| websocket_info(arg1, conn_state, state) | |
| websocket_terminate(reason, conn_state, state) |
Types ↑
Functions
Specs:
- connect(module, options) :: {:ok, pid} | {:error, any}
Negotiate a WebSocket connection.
Options
:hostrequired, the target host.:portrequired, the target port.:pathdefaults to “”, HTTP resource path. It must be prefixed with a/.
Callback implementation for c:Spell.Transport.send_message/2.