<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I have succesfully connected to Erlang
node from C node as when I execute following</font>
<br>
<br><font size=2 face="sans-serif">nodes(hidden).</font>
<br>
<br><font size=2 face="sans-serif">from Erlang node...i get the name of
c node as </font>
<br><font size=2 face="sans-serif">c69@localhost</font>
<br>
<br><font size=2 face="sans-serif">Now when I am trying to send the message
from C node to Erlang node using :</font>
<br>
<br><font size=2 face="sans-serif">if(erl_reg_send(sockfd, "pong@localhost.localdomain",
cmsg) == 0)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">printf("inside");</font>
<br><font size=2 face="sans-serif">erl_err_sys("erl_reg_send");</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">printf("outside");</font>
<br>
<br><font size=2 face="sans-serif">I get neither inside nor outside...</font>
<br>
<br><font size=2 face="sans-serif">the prompt just comes to next line</font>
<br>
<br><font size=2 face="sans-serif">looks like process is dying while using
erl_reg_send</font>
<br>
<br>
<br><font size=2 face="sans-serif">On the erlang side, I am using following
pong script:</font>
<br>
<br><font size=2 face="sans-serif">-module(tut17).</font>
<br>
<br><font size=2 face="sans-serif">-export([start_ping/1, start_pong/0,
ping/2, pong/0]).</font>
<br>
<br><font size=2 face="sans-serif">ping(0, Pong_Node) -></font>
<br><font size=2 face="sans-serif"> {pong, Pong_Node} ! finished,</font>
<br><font size=2 face="sans-serif"> io:format("ping finished~n",
[]);</font>
<br>
<br><font size=2 face="sans-serif">ping(N, Pong_Node) -></font>
<br><font size=2 face="sans-serif"> {pong, Pong_Node} ! {ping,
self()},</font>
<br><font size=2 face="sans-serif"> receive</font>
<br><font size=2 face="sans-serif"> pong -></font>
<br><font size=2 face="sans-serif">
io:format("Ping received pong~n", [])</font>
<br><font size=2 face="sans-serif"> end,</font>
<br><font size=2 face="sans-serif"> ping(N - 1, Pong_Node).</font>
<br>
<br><font size=2 face="sans-serif">pong() -></font>
<br><font size=2 face="sans-serif"> receive</font>
<br><font size=2 face="sans-serif"> finished
-></font>
<br><font size=2 face="sans-serif">
io:format("Pong finished~n", []);</font>
<br><font size=2 face="sans-serif"> {ping, Ping_PID}
-></font>
<br><font size=2 face="sans-serif">
io:format("Pong received ping~n", []),</font>
<br><font size=2 face="sans-serif">
Ping_PID ! pong,</font>
<br><font size=2 face="sans-serif">
pong()</font>
<br><font size=2 face="sans-serif"> end.</font>
<br>
<br><font size=2 face="sans-serif">start_pong() -></font>
<br><font size=2 face="sans-serif"> register(pong, spawn(tut17,
pong, [])).</font>
<br>
<br><font size=2 face="sans-serif">start_ping(Pong_Node) -></font>
<br><font size=2 face="sans-serif"> spawn(tut17, ping, [3,
Pong_Node]).</font>
<br>
<br><font size=2 face="sans-serif">and after the executing following in
Erlang shell :</font>
<br>
<br><font size=2 face="sans-serif">tut17:start_pong().</font>
<br>
<br><font size=2 face="sans-serif">I assume that my server process is registered
and listening to messages - please correct me if ny understanding is not
correct or anythingelse needs to be done.....</font>
<br>
<br><font size=2 face="sans-serif">Please note : I am able to connect
but not able to send message from C node to Erlang node3</font>
<br>
<br><font size=2 face="sans-serif">Appreciate your help..</font>
<br>
<br><font size=2 face="sans-serif">Thanks and Regards,</font>
<br>
<br><font size=2 face="sans-serif">jb____________________________________________</font>
<br>
<br><pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
</pre>