Пример #1
0
        //! 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 ***");
        }
Пример #2
0
 public void Go()
 {
     net = new NetworkLevel2Controller();
     net.ListenAsServer(3456);
     net.NewConnection += new Level2NewConnectionHandler(net_NewConnection);
     net.Disconnection += new Level2DisconnectionHandler(net_Disconnection);
     net.RegisterPacketConsumer('Z', new Level2ReceivedPacketHandler(net_ReceivedPacket));
     //net.ReceivedPacket += new Level2ReceivedPacketHandler(net_ReceivedPacket);
     // net.ListenAsServer( 3457 );
     while (true)
     {
         net.Tick();
         Thread.Sleep(50);
     }
 }
Пример #3
0
            public void Go()
            {
                network = new NetworkLevel2Controller();
                network.ListenAsServer(serverport);
                network.NewConnection += new Level2NewConnectionHandler(network_NewConnection);

                RpcController rpc = new RpcController(network);

                TestController.GetInstance().rpc = rpc;

                while (true)
                {
                    network.Tick();
                    Thread.Sleep(50);
                }
                //Testing.TestInterface_ClientProxy testinterface_clientproxy = new OSMP.Testing.TestInterface_ClientProxy( rpc,
            }
Пример #4
0
        //! 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 ***");
        }
Пример #5
0
 public void Go()
 {
     net = new NetworkLevel2Controller();
     net.ListenAsServer(3456);
     net.NewConnection += new Level2NewConnectionHandler(net_NewConnection);
     net.Disconnection += new Level2DisconnectionHandler(net_Disconnection);
     net.RegisterPacketConsumer('Z', new Level2ReceivedPacketHandler(net_ReceivedPacket));
     //net.ReceivedPacket += new Level2ReceivedPacketHandler(net_ReceivedPacket);
     // net.ListenAsServer( 3457 );
     while (true)
     {
         net.Tick();
         Thread.Sleep(50);
     }
 }
Пример #6
0
            public void Go()
            {
                network = new NetworkLevel2Controller();
                network.ListenAsServer(serverport);
                network.NewConnection += new Level2NewConnectionHandler(network_NewConnection);

                RpcController rpc = new RpcController(network);
                TestController.GetInstance().rpc = rpc;

                while (true)
                {
                    network.Tick();
                    Thread.Sleep(50);
                }
                    //Testing.TestInterface_ClientProxy testinterface_clientproxy = new OSMP.Testing.TestInterface_ClientProxy( rpc,
            }