View Source Xander.Util (Xander v0.1.1)

Summary

Functions

Unwrap the multiplexer header from a CDDL message. This can be used to extract the payload from node responses.

Functions

plex(msg)

@spec plex(binary()) :: map()

Unwrap the multiplexer header from a CDDL message. This can be used to extract the payload from node responses.

Examples

iex> Xander.Util.plex(<<0, 0, 0, 0, 1, 2, 0, 3, 97, 98, 99>>)
%{payload: <<97, 98, 99>>, protocol_id: <<1, 2>>, size: <<0, 3>>}