summaryrefslogtreecommitdiff
path: root/src/pbx_conn.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbx_conn.erl')
-rw-r--r--src/pbx_conn.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pbx_conn.erl b/src/pbx_conn.erl
index f819fdd..dde5de2 100644
--- a/src/pbx_conn.erl
+++ b/src/pbx_conn.erl
@@ -12,6 +12,8 @@
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [?HOST, ?PORT], []).
+%%%
+
init([Host, Port]) ->
pbx_pdu:start_link(),
pbx_pdu:add_handler(pbx_acse, []),
@@ -39,10 +41,13 @@ handle_info({tcp_closed, _}, Socket) ->
terminate(_Reason, Socket) ->
pbx_pdu:delete_handler(pbx_acse, []),
- gen_tcp:close(Socket).
+ gen_tcp:close(Socket),
+ ok.
code_change(_OldVsn, Socket, _Extra) ->
{ok, Socket}.
+%%%
+
send(Reply) ->
gen_server:cast(?SERVER, Reply).