136
140
{reply, Reply, State#state{controller = Controller,
137
141
receive_handle = ReceiveHandle}};
143
handle_call({listen, _Sup, Opts}, _From, State) ->
146
{value, {_, ReceiveHandle}} = lists:keysearch(receive_handle, 1, Opts),
147
{value, {_, Controller}} = lists:keysearch(port, 1, Opts),
150
Reply = {ok, SendHandle, ControlPid},
151
Controller ! {listen, ReceiveHandle, SendHandle, ControlPid},
152
{reply, Reply, State#state{controller = Controller,
139
155
handle_call(stop, _From, State) ->
140
156
d("handle_call(stop) -> entry"),