buckaroo v0.3.1 Buckaroo.Socket behaviour View Source
A simple websocket implementation.
Link to this section Summary
Callbacks
Incoming frames.
Incoming process messages.
Initialize the websocket.
Websocket termination.
Link to this section Types
Link to this type
frame()
View Sourceframe() :: :ping | :pong | {:text | :binary | :ping | :pong, binary()}
Websocket frames.
Note that there is no need to send pong frames back as Cowboy does it automatically for you.
Websocket callback result.
Link to this section Callbacks
Incoming frames.
Incoming process messages.
Link to this callback
init(conn, state)
View Sourceinit(conn :: Plug.Conn.t(), state :: state) :: result(state) when state: any()
Initialize the websocket.
Passes the connection and the given state.
Websocket termination.