Skip to content

Instantly share code, notes, and snippets.

@stesla
Created December 11, 2008 03:39
Show Gist options
  • Select an option

  • Save stesla/34596 to your computer and use it in GitHub Desktop.

Select an option

Save stesla/34596 to your computer and use it in GitHub Desktop.
-define(ANNOUNCE(Id, Port), {announce, Id, Port}).
handle_info({radio_signal, Ip, Port, ?ANNOUNCE(Id, Port)}, State) ->
#state{id=MyId} = State,
case Id of
MyId -> ignore;
_ ->
error_logger:info_msg("Received PING from ~p~n", [Id]),
clusterl_radio:transmit(Ip, Port, ?ANNOUNCE(Id, Port))
end,
{noreply, State};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment