[erlang-questions] how: cascading events in gen_fsm

Lev Walkin <>
Wed Nov 28 01:45:59 CET 2007


jm wrote:
> 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.

What's the problem with 16KB message?




More information about the erlang-questions mailing list