[erlang-questions] How to detect connection requested by cnode?
Martin Hässler
mhssler@REDACTED
Sat Feb 16 20:33:04 CET 2013
On Sat, Feb 16, 2013 at 11:40 AM, <yashgt@REDACTED> wrote:
> When a remote C-node connects to an Erlang node using ei_connect or
> erl_connect, I would like the erlang node to do something, like print the
> name of the c-node that requested the connection.
Is this what you want?
ok = net_kernel:monitor_nodes(true, [{node_type, all}]),
receive {nodeup, Node, _} ->
io:format("Node up: ~p~n", [Node])
end.
More information about the erlang-questions
mailing list