ChannelClient.Message.V1 (channel_client v0.1.1)

Copy Markdown

Phoenix Channels protocol 1.0.0 serializer.

Messages are JSON objects with string keys:

%{"ref" => "1", "topic" => "rooms:lobby", "event" => "new:msg", "payload" => %{}}

Summary

Functions

decode!(map)

@spec decode!(term()) :: ChannelClient.Message.t()

encode!(msg)

@spec encode!(ChannelClient.Message.t()) :: map()