How to call a gen_server from another node?
Vlad Dumitrescu XX (LN/EAB)
vlad.xx.dumitrescu@REDACTED
Tue Jul 26 09:21:38 CEST 2005
-----Original Message-----
From: [mailto:owner-erlang-questions@REDACTED]On Behalf Of ulrika@REDACTED
> Is it possible to use a gen_server instead? How do I send a message from a
> macro on one node to a gen_server process on another/call a function in
> some other program on another node?
Hi,
Of course you can use a gen_server. The macro would then have to become
gen_server:cast({ProcessName, Node}, Msg)
and in the gen_server it's business as usual, handle it in handle_cast.
It would also work with the macro you already have, and then the handling would have to be done in handle_info.
regards,
Vlad
More information about the erlang-questions
mailing list