[erlang-questions] Binary/term format

Bob Cowdery <>
Wed Sep 27 11:01:09 CEST 2006

As I didn't get any responses I'm assuming this is pretty virgin ground. Having got a bit further maybe a couple of slightly more specific questions might help.

Some of the messages from C node to Erlang are consumed by the Erlang node and others passed through to another C node. At the moment I am having trouble even with the Erlang bound messages. As I was having no luck with receiving binary messages I changed one to term format using ei_format() and this was then received. However when I tried to reply to the C node using '{regname, nodename} ! Msg' it never sees the mesage. The receive on the C node was in a timeout retry loop and it just kept looping. No errors so I have no clues. Just had a thought, the reply message is in term format (as I forgot to convert it) and the ei_receive_msg()- does that expect binary format? 

If I can get this working the next question is when receiving a binary message in an Erlang node what should the match pattern be in the receive, as at the moment I can't seem to match it?

I hope someone can help out here.


-----Original Message-----
[mailto:]On Behalf Of Bob Cowdery
Sent: 26 September 2006 12:40
To: Erlang-Questions (E-mail)
Subject: [erlang-questions] Binary/term format

Hi all,

If I have a mix of nodes, some C nodes using binary format (ei.lib) and other native erlang nodes using term format then...

If I am sending a message between two C node that goes via an erlang node can I just pass the binary format message through without worrying about its format (it may also be transferred between two processes in the same erlang node as well, but neither needs to look inside it. 

Second, can I determine the format at run time so when I need to consume a message I know whether to do a conversion on it.


erlang-questions mailing list


More information about the erlang-questions mailing list