[erlang-questions] gen_tcp and large HTTP headers

Robert Virding robert.virding@REDACTED
Fri Jun 24 15:27:37 CEST 2011

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
> when
> you parse again and again old data on receiving new.

More information about the erlang-questions mailing list