[erlang-questions] Two confusions??

Vasilij Savin vasilij.savin@REDACTED
Wed Feb 10 18:26:54 CET 2010


Hello,

Comments inline.

On Wed, Feb 10, 2010 at 6:08 PM, Ish Rattan <ishwar@REDACTED>wrote:

>
> 1. In socket based erlang code I have seen
> tcp-options of the form:
>   [binary, {packet,0},..]
>   [binary, {packet,4},..]
>
> what is the difference between the two?
>

First pattern matches if second element of tuple is 0,  second - if value is
4.



> 2. A C-client sends 4-byte int request (with numeric
>   value N encoded in the 4-bytes), erlang server
>   receives the request (in binary) and prints as:
>   <<0, 0, 0, N>>
>
> what is the interpretation here?
>

It is somewhere in documentation for sure.

Regards,
Vasilij Savin


More information about the erlang-questions mailing list