//! metaverseserver entry point. Processes commandline arguments; starts dbinterface and serverfileagent components; handles initialization public void Init(IConfigSource commandlineConfig, IServerControllers controllers) { config = Config.GetInstance(); Test.Info("*** Server starting ***"); Running = true; network = new NetworkLevel2Controller(); ServerPort = commandlineConfig.Configs["CommandLineArgs"].GetInt("serverport", config.ServerPort); Test.Debug("Creating Metaverse Client listener on port " + ServerPort); network.ListenAsServer(ServerPort); network.NewConnection += new Level2NewConnectionHandler(network_NewConnection); network.Disconnection += new Level2DisconnectionHandler(network_Disconnection); rpc = new RpcController(network); netreplicationcontroller = new NetReplicationController(rpc); World = new WorldModel(netreplicationcontroller); controllers.Plugin.LoadServerPlugins(); Test.Info("*** Server initialization complete ***"); }
//! metaverseserver entry point. Processes commandline arguments; starts dbinterface and serverfileagent components; handles initialization public void Init( IConfigSource commandlineConfig, IServerControllers controllers ) { config = Config.GetInstance(); Test.Info("*** Server starting ***"); Running = true; network = new NetworkLevel2Controller(); ServerPort = commandlineConfig.Configs["CommandLineArgs"].GetInt( "serverport", config.ServerPort ); Test.Debug("Creating Metaverse Client listener on port " + ServerPort ); network.ListenAsServer(ServerPort); network.NewConnection += new Level2NewConnectionHandler(network_NewConnection); network.Disconnection += new Level2DisconnectionHandler(network_Disconnection); rpc = new RpcController(network); netreplicationcontroller = new NetReplicationController( rpc ); World = new WorldModel(netreplicationcontroller); controllers.Plugin.LoadServerPlugins(); Test.Info("*** Server initialization complete ***"); }