%%----------------------------------------------------
%% Acceptor监控树
%% @author huangyongxing@yeah.net
%%----------------------------------------------------
-module(game_acceptor_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-include("common.hrl").

start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

init([]) ->
    ?INFO_TTY("Start supervisor [~w] ...", [?MODULE]),
    {ok, {
            {simple_one_for_one, 10, 10},  % {RestartStrategy, MaxR, MaxT}, MaxT秒内超过MaxR次重启，即停止监控树和子进程
            [
                {game_acceptor, {game_acceptor, start_link, []}, transient, 2000, worker, [game_acceptor]}
            ]
        }
    }.

