ChannelClient.Message.V2 (channel_client v0.1.1)

Copy Markdown

Phoenix Channels protocol 2.0.0 serializer.

Messages are five element JSON arrays:

[join_ref, ref, topic, event, payload]

Per the protocol, a phx_join frame carries its own ref as the join_ref, and every other frame for a topic carries the ref of the join that established the channel.

Summary

Functions

decode!(list)

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

encode!(msg)

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