Phoenix.Socket.Message

Defines a Phoenix.Socket Message dispatched over channels.

The Message format requires the following keys:

Source

Summary

from_map!(map)

Converts a map with string keys into a %Phoenix.Socket.Message{}. Raises Phoenix.Socket.Message.InvalidMessage if not valid

parse!(text)

Parse JSON into required format Raises Phoenix.Socket.Message.InvalidMessage if invalid

Functions

from_map!(map)

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

Source
parse!(text)

Parse JSON into required format Raises Phoenix.Socket.Message.InvalidMessage if invalid

Returns The %Phoenix.Socket.Message{} parsed from JSON

Source