[erlang-questions] how: cascading events in gen_fsm

jm <>
Wed Nov 28 00:35:01 CET 2007

Lev Walkin wrote:
> Hate special cases...
> Can you switch to a known-length-size-header processing after
> dealing with a header?
>  From `erl -man inet`:
>             {packet, PacketType} (TCP/IP sockets):
>             Defines the type of packets to use for a socket. The  fol-
>             lowing values are valid:
>                   1 | 2 | 4:
>                   Packets consist of a header specifying the number of
>                   bytes in the packet,  followed  by  that  number  of
>                   bytes. The length of header can be one, two, or four
>                   bytes; the order of the bytes  is  big-endian.  Each
>                   send  operation  will  generate  the header, and the
>                   header will be stripped off on each  receive  opera-
>                   tion.

Nice idea hadn't thought of that and I hate to throw a spanner in the 
works but one of the messages I've witnessed was 16KB length. Because 
I'm snooping on the traffic as part of a proxy this could result in 
large amounts of jitter and the timing out of sockets.

thanks anyway,

More information about the erlang-questions mailing list