buckaroo v0.1.1 Buckaroo.Socket behaviour View Source
A simple websocket implementation.
Link to this section Summary
Link to this section Types
Link to this type
frame()
View Source
frame()
View Source
frame() :: :ping | :pong | {:text | :binary | :ping | :pong, binary()}
frame() :: :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.
Link to this type
result(state) View Source
Websocket callback result.
Link to this section Callbacks
Link to this callback
handle(frame, state) View Source
Incoming frames.
Link to this callback
info(any, state) View Source
Incoming process messages.
Link to this callback
init(conn, state)
View Source
init(conn, state)
View Source
init(conn :: Plug.Conn.t(), state :: state) :: result(state) when state: any()
init(conn :: Plug.Conn.t(), state :: state) :: result(state) when state: any()
Initialize the websocket.
Passes the connection and the given state.
Link to this callback
terminate(reason, req, state) View Source
Websocket termination.