[erlang-questions] How to call a locally Pid cross node on Distributed Application!
wenew zhang
wenewboy@REDACTED
Thu Apr 17 09:38:55 CEST 2008
Yes,it's could create a process and use Pid!{Message} send message,
but i use gen_server behavior so i want to use
gen_server:call(Pid,{Message}) to send message,
in my situation, create process successfully,but can't use gen_server:call()
1.why i get the "exception exit: {noproc," message like below?
2.when i use appmon:start() ,i neither find the pid on AuthserverNode nor
SocketServerNode.
(socketservernode@REDACTED)4> Pid=spawn(
authservernode@REDACTED,authserver1,start,[]).
<5805.82.0>
Authserver start_link
(socketservernode@REDACTED)5> Pid.
<5805.82.0>
(socketservernode@REDACTED)6>
gen_server:call(Pid,{213,"root","123456"}).
** exception exit: {noproc,
{gen_server,call,[<5805.82.0>,{213,"root","123456"}]}}
in function gen_server:call/2
>
> > thanks for your reply,
> > i see a example like you said on Joe 's book,
> > can i use gen_server as a rpc:call()'s Arg ?How can i do that?
> > tks
>
>
> Sure you can.
>
> rpc:call(Node, yourgenserver, start, [Params]).
>
>
> BTW don't top-post and don't forget to CC to erlang-questions :)
>
> --
> With best regards!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080417/cd9cb751/attachment.htm>
More information about the erlang-questions
mailing list