How to call a gen_server from another node?

Vlad Dumitrescu XX (LN/EAB) <>
Tue Jul 26 09:21:38 CEST 2005

-----Original Message-----
From: [mailto:]On Behalf Of 
> 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?


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.


More information about the erlang-questions mailing list