Skip to content

Commit

Permalink
ADded types function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Licenser committed Aug 20, 2012
1 parent eaba84c commit a15b319
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mdns_node_discovery_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
handle_info/2,
terminate/2,
add_type/1,
types/0,
code_change/3]).

%% ------------------------------------------------------------------
Expand All @@ -43,6 +44,9 @@
add_type(Type) ->
gen_server:cast({local, mdns_client:name()}, {add_type, Type}).

types() ->
gen_server:call({local, mdns_client:name()}, types).

start_link() ->
start_link([]).

Expand Down Expand Up @@ -105,6 +109,10 @@ handle_call({discovered, Type}, _, #state{discovered = Discovered} = State) ->
{reply, Res, State};



handle_call(types, _, #state{types = Types} =State) ->
{reply, {ok, Types}, State};

handle_call(stop, _, State) ->
{stop, normal, State}.

Expand Down

0 comments on commit a15b319

Please sign in to comment.