From 0870ad7cf5f7c88d95338460fee88d59081582bd Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Wed, 31 Aug 2011 20:18:04 -0500 Subject: [PATCH] Add Supervisor, TableId, and the [future] irc_object_sup to the IRC connection state. --- irc/irc_conn.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/irc/irc_conn.erl b/irc/irc_conn.erl index eb1c9ce..f18551b 100644 --- a/irc/irc_conn.erl +++ b/irc/irc_conn.erl @@ -1,6 +1,6 @@ -module(irc_conn). -behavior(gen_server). --vsn(1). +-vsn(2). -export([ start_link/3 @@ -21,7 +21,10 @@ config, % initial configuration params joined = false,% indicates whether we have joined the channels socket, - buffer = "" % for the TCP session + buffer = "", % for the TCP session + supervisor, % irc_net_sup instance + table_id, % ets table to hold shared data + object_sup = none % supervisor for irc_object_* }). start_link(Instance, Supervisor, TableId) -> @@ -41,7 +44,9 @@ init({Instance, Supervisor, TableId}) -> }), State = #irc_state{instance = Instance, config = Config, - socket = Socket + socket = Socket, + supervisor = Supervisor, + table_id = TableId }, {ok, State}. -- 2.11.0