Francis.Websocket (Francis v0.4.0)

View Source

WebSock implementation backing the Francis.ws/3 macro.

Every WebSocket route shares this module; the route's handler function is carried in the connection state. It is not intended for direct use by application code.

Summary

Functions

Formats a handler return value for the WebSock protocol.

Upgrades conn to a WebSocket connection driven by handler.

Functions

format_response(arg1, state)

Formats a handler return value for the WebSock protocol.

upgrade(conn, handler, opts)

@spec upgrade(Plug.Conn.t(), function(), Keyword.t()) :: Plug.Conn.t()

Upgrades conn to a WebSocket connection driven by handler.