Skip to content

Instantly share code, notes, and snippets.

@nickva
Created November 11, 2021 20:05
Show Gist options
  • Save nickva/8fa36b541a2fd94d742489af24736324 to your computer and use it in GitHub Desktop.
Save nickva/8fa36b541a2fd94d742489af24736324 to your computer and use it in GitHub Desktop.
Erlang net_kernel:monitor_nodes/1 snippet
spawn(fun () ->
net_kernel:monitor_nodes(true),
F = fun Loop() ->
receive Msg ->
io:format("~n *** mon msg:~p~n", [Msg]),
Loop()
end
end,
F()
end).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment