chaperon v0.3.1 Chaperon.Action.WebSocket View Source
Helper functions for creating WebSocket actions.
Link to this section Summary
Functions
Returns a Chaperon.WebSocket.Close action with options.
Returns a Chaperon.WebSocket.Connect action for a given path.
Returns a Chaperon.WebSocket.ReceiveMessage action with options.
Returns a Chaperon.WebSocket.SendMessage action with a given message and
options.
Link to this section Types
Link to this section Functions
Returns a Chaperon.WebSocket.Close action with options.
Returns a Chaperon.WebSocket.Connect action for a given path.
Returns a Chaperon.WebSocket.ReceiveMessage action with options.
options can include a result handler callback to be called once the message
arrived.
Example:
Chaperon.Action.WebSocket.recv(with_result: fn (session, result) ->
session
|> Chaperon.Session.assign(ws_message: result)
end)
Returns a Chaperon.WebSocket.SendMessage action with a given message and
options.