aboutsummaryrefslogblamecommitdiffstats
path: root/test/notify_and_wait_protocol.erl
blob: e3e857b5113d0a5d9d2a2e95936dd1af72544f55 (plain) (tree)
1
2
3
4
5
6
7
                                  
                           
 
                        

                  
                                                 





                                                        
-module(notify_and_wait_protocol).
-behaviour(ranch_protocol).

-export([start_link/3]).
-export([init/2]).

start_link(_, _, [{msg, Msg}, {pid, TestPid}]) ->
	Pid = spawn_link(?MODULE, init, [Msg, TestPid]),
	{ok, Pid}.

init(Msg, Pid) ->
	Pid ! Msg,
	receive after 2500 -> ok end.