[erlang-questions] gen_tcp and large HTTP headers
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
On Fri, Jun 24, 2011 at 9:27 AM, Robert Virding
> 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.
> ----- "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
>> you parse again and again old data on receiving new.
> erlang-questions mailing list
More information about the erlang-questions