Phoenix.Socket.Message
Summary
| from_map!(map) | Converts a map with string keys into a |
| parse!(text) | Parse JSON into required format
Raises |
Functions
Converts a map with string keys into a %Phoenix.Socket.Message{}.
Raises Phoenix.Socket.Message.InvalidMessage if not valid
See parse!/1 for required keys
Parse JSON into required format
Raises Phoenix.Socket.Message.InvalidMessage if invalid
The Message format requires the following keys:
- channel - The String Channel namespace, ie “messages”
- topic - The String topic namespace, ie “123”
- event - The String event name, ie “join”
- message - The String JSON message payload
Returns The %Phoenix.Socket.Message{} parsed from JSON