[erlang-questions] gen_tcp custom framing

Joern opendev@REDACTED
Mon Oct 8 13:06:13 CEST 2007


Hi Peter,

On 10/5/07, Peter Lund <erlang@REDACTED> wrote:

> Is this UCP or CIMD perhaps? :)

It's UCP, wonderful little gem, really.

> Standard practice or not, I do not know, but some number of times, I
> have now implemented myself buffering of incoming IP-segments into a
> binary and each time new data comes in I try to find one or more complete
> packages in this buffer. If I find it I handle the packages.

Yes. I think I'll just split my whole packet matching code in two
functions, for head and tail matching. The head is fixed size, so that
should work ok.

> In R9, I have also forced to match each packet more than one time since
> an initial length value read out first, cannot be used later in the same
> binary match statement, but I am guessing that this problem now is history
> when using R11.

Hmm - I'm not sure I follow you on this one. Can you elaborate?

Best regards,


Joern
--



More information about the erlang-questions mailing list