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.

Source

Summary

connect(serializer, options)

Negotiate a WebSocket connection

init(arg1, conn_state)
send_message(transport, raw_message)

Callback implementation for c:Spell.Transport.send_message/2

websocket_handle(arg1, conn_state, state)
websocket_info(arg1, conn_state, state)
websocket_terminate(reason, conn_state, state)

Types

options :: [host: String.t, port: :inet.port, path: String.t]

Functions

connect(serializer, options)

Specs:

Negotiate a WebSocket connection.

Options

  • :host required, the target host.
  • :port required, the target port.
  • :path defaults to “”, HTTP resource path. It must be prefixed with a /.
Source
init(arg1, conn_state)
Source
send_message(transport, raw_message)

Callback implementation for c:Spell.Transport.send_message/2.

Source
websocket_handle(arg1, conn_state, state)
Source
websocket_info(arg1, conn_state, state)
Source
websocket_terminate(reason, conn_state, state)
Source