-module(irc_conn).
-behavior(gen_server).
--vsn(1).
+-vsn(2).
-export([
start_link/3
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) ->
}),
State = #irc_state{instance = Instance,
config = Config,
- socket = Socket
+ socket = Socket,
+ supervisor = Supervisor,
+ table_id = TableId
},
{ok, State}.