[erlang-questions] inet / active once

Joost Yervante Damad joost.damad@REDACTED
Thu Nov 16 08:12:41 CET 2006


Hi,

recently I've been playing with the erlang programming language, and I like 
it. I wrote a few test servers, and I especially like the inet active once 
mechanism for having automatically framed messages, even over a TCP 
connection, in combination with the {packet, PacketType} option.

Yesterday, I wanted to try something more heavy and implement a simple 
DIAMETER stack, however it's header format does not match any of the existing 
packet types available, because it has a header like this:

 byte1: version
 byte2-4: packet length

I did some digging in the OTP code and it seems the packet types are 
implemented in inet_drv.c.

I see now two possibilities, either I expand inet_drv.c to have a new package 
type, or I use {active, false}, and implemented the message framing in 
erlang.

Is there another possibilty? What is the recommended aproach?

Greetings, Joost Damad



More information about the erlang-questions mailing list