Yes,it's could create a process and use Pid!{Message} send message,<br><br>but i use gen_server behavior so i want to use gen_server:call(Pid,{Message}) to send message,<br><br>in my situation, create process successfully,but can't use gen_server:call()<br>
<br>1.why i get the "exception exit: {noproc," message like below?<br>2.when i use appmon:start() ,i neither find the pid on AuthserverNode nor SocketServerNode.<br><br><br><br>(socketservernode@wenewlaptop.flashpk.com.cn)4> Pid=spawn(<a href="mailto:authservernode@wenewlaptop.flashpk.com.cn">authservernode@wenewlaptop.flashpk.com.cn</a>,authserver1,start,[]).<br>
<5805.82.0><br>Authserver start_link <br>(socketservernode@wenewlaptop.flashpk.com.cn)5> Pid.<br><5805.82.0><br><span style="color: rgb(255, 0, 0);">(socketservernode@wenewlaptop.flashpk.com.cn)6> gen_server:call(Pid,{213,"root","123456"}).</span><br>
** exception exit: {noproc,<br> {gen_server,call,[<5805.82.0>,{213,"root","123456"}]}}<br> in function gen_server:call/2<br><br><br><div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> <br>> thanks for your reply,<br> > i see a example like you said on Joe 's book,<br> > can i use gen_server as a rpc:call()'s Arg ?How can i do that?<br> > tks<br> <br> <br>Sure you can.<br> <br> rpc:call(Node, yourgenserver, start, [Params]).<br>
<br> <br> BTW don't top-post and don't forget to CC to erlang-questions :)<br> <br>--<br> With best regards!<br> </blockquote></div><br>