hello,
I am just a Msc student and do my graduation project with Erlang program.
I wrote a small program using C with erlang library- ei_connect.
the erlang will be started by C node and running in the background.
I have created a global register name-‘repl’, Sending use ei_reg_send()
and receive the echo message using ei_xreceive_msg(), while, every time
when i can run the ei_reg_send() well and only get the ‘ERL_TICK’ from
ei_xreceive_msg(), nothing else…..
this problem took me long time………. and next week i have to submit
it to my professor, please give some answer and any notice about this
would be appreciated. please, please…….
the following is part of my program.
//send message
char *reg_serv=”repl”; // repl is the erlang node registerd process
if((rtn=ei_reg_send(&ec, fd, reg_serv, x.buff, x.index))
global:register_name(repl,spawn(enode2,reply,[])),
io:format(“ok to run start\n”).
reply() ->
receive
Rmes ->
io:fwrite(Rmes),
{any, cnode2@ncc1701.macs.hw.ac.uk} ! {self(), Rmes},
io:format(“ok to send message to node c2\n”)
end.