I have an erlang server that will be communicating via tcp sockets with a client written in C. Are there any C libraries for parsing erlang binary terms to C structs?
I realize this is not absolutely necessary, but it would be very convenient.
I have an erlang server that will be communicating via tcp sockets with a client written in C. Are there any C libraries for parsing erlang binary terms to C structs?
I realize this is not absolutely necessary, but it would be very convenient.
There are C libraries for interprocess communication between Erlang and C, erl_interface and C Nodes:
I've crafted my own: EPAPI (Erlang Port API) in C/C++. Very easy to use and I provide a Debian repo for easy updates.
PktHandler *ph = new PktHandler();
MsgHandler *mh = new MsgHandler(ph);
//Register a message type
// {echo, {Counter}}
mh->registerType(1, "echo", "l" );
//Wait for a message
Msg *m;
result = mh->rx(&m);
//Verify return code
if (result) {
//handle error
printf("ERROR, message: %s", mh->strerror());
// ...
}