[erlang-questions] Erlang and FIX protocol

Max Lapshin max.lapshin@REDACTED
Thu May 3 17:02:02 CEST 2012


>
> 1> fix:decode(<<"8=FIX.4.4",1,"9=23",1,"35=0",1,"93=10",1,"89=A",1,"89=234",1,"10=999",1>>).
> {ok,{heartbeat,undefined,undefined,undefined,undefined,
>               undefined,
>               [{signature_length,10},
>                {signature,<<"A">>},
>                {signature,<<"234">>}]},
>    <<>>}
>
> This is incorrect, as far as I can remember. The actual value of the signature is "A|89=234|1" here, not ["A", "234"] (not to mention that your signature length does not match the content).


Are you really sure, that it is so?
Specification tells:

Data fields are always immediately preceded by a length field. The
length field should specify the number of bytes of the value of the
data field (up to but not
including the terminating SOH).

"A|89=234|1" is 10 bytes but there must be terminating SOH after this.



More information about the erlang-questions mailing list