[erlang-questions] How erlang handle complicated data structure like C?

Jovi Zhang bookjovi@REDACTED
Mon Sep 19 07:09:38 CEST 2011


But how to change record format to binary correctly? because the
binary need to transport in network.
When I try below, the output seems wrong.

-record(semper_packet_t,
    {tdm_leg = <<1:8, 3:8>>,
     ip_leg = 2
     }).

term_to_binary(#semper_packet_t.tdm_leg)

result: <<131,97,2>>



More information about the erlang-questions mailing list