Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Pldlen:24/little, % 3 bytes payload length
_:8, % 1 byte sequence id or packet nb
Pld/binary % content
>>) ->
case byte_size(Pld) == Pldlen of
true ->
parse_content(Args, Pld);
false ->
{{error, up}, unexpected_data}
parse_header(Args, _) ->
{{error, up}, unexpected_data}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment