[erlang-questions] gen_tcp and large HTTP headers

Steve Vinoski vinoski@REDACTED
Fri Jun 24 18:52:08 CEST 2011


The underlying packet parser is capable of partial parsing, and that's
how decode_packet uses it. It's just that the inet driver doesn't seem
to call the packet parser the right way to take advantage of partial
parsing.

--steve

On Fri, Jun 24, 2011 at 9:27 AM, Robert Virding
<robert.virding@REDACTED> wrote:
> Yes, of course you cannot get around some buffering. It is (should be) easier for the parser to keep track of its buffer as it can parse as it goes and only keep its already parsed data and perhaps that bit in the input buffer which was not enough for a parse, or partial parse.
>
> Robert
>
>
> ----- "Max Lapshin" <max.lapshin@REDACTED> wrote:
>
>> On Fri, Jun 24, 2011 at 12:10 AM, Robert Virding
>> <robert.virding@REDACTED> wrote:
>> > Wouldn't it be better to rewrite the packet parser to work in a
>> re-entrant fashion so as to be able to span over many packets? It
>> would save a lot of fiddling with the recbuf size.
>> >
>>
>> You always have to keep buffer: either in receiver, either in parser.
>>
>> Easier to use when parser is stateless, but it requires more work
>> when
>> you parse again and again old data on receiving new.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list