Phoenix v1.3.0 Phoenix.Socket.Message View Source
Defines a message dispatched over transport to channels and vice-versa.
The message format requires the following keys:
topic
- The string topic or topic:subtopic pair namespace, for example “messages”, “messages:123”event
- The string event name, for example “phx_join”payload
- The message payloadref
- The unique string ref
Link to this section Summary
Functions
Converts a map with string keys into a message struct
Link to this section Types
Link to this type
t()
View Source
t() :: %Phoenix.Socket.Message{event: term(), join_ref: term(), payload: term(), ref: term(), topic: term()}
Link to this section Functions
Converts a map with string keys into a message struct.
Raises Phoenix.Socket.InvalidMessageError
if not valid.