Trouble with ei...
Thu Dec 4 09:47:33 CET 2003
I am trying to connect to an Erlang node from a C program, using ei.
I wrote a simple server:
Which works when called from another erlang node.
However, the following C program exits without errors, but nothing appears on the server's output...
ei_connect_init(&ec, "pcwilliams", "vaccin", 1);
int fd = ei_connect(&ec, "node2@REDACTED");
if (fd < 0) erl_err_quit("connect failed");
int res = ei_reg_send(&ec, fd, "spike", x.buff, x.index);
if (res < 0) erl_err_quit("send failed");
My configuration is W2K, R9C.
I tried long and short node names, to no avail.
When I use a bad cookie, the server reports an attempted connection from unauthorized node, and the C program exits with an error. So the program seems to be connecting to the Erlang node, but the message is not getting through to the server.
More information about the erlang-questions