Beispiel #1
0
 public void OnTick()
 {
     network.Tick();
     netreplicationcontroller.Tick();
     if (Tick != null)
     {
         Tick();
     }
 }
Beispiel #2
0
            public void Go()
            {
                network = new NetworkLevel2Controller();
                network.ConnectAsClient(serveraddress, serverport);
                network.NewConnection += new Level2NewConnectionHandler(network_NewConnection);

                while (true)
                {
                    network.Tick();
                    Thread.Sleep(50);
                }
            }
Beispiel #3
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);
     }
 }
Beispiel #4
0
 //! Main loop, called by SDL once a frame
 void MainLoop()
 {
     //LogFile.WriteLine("Tick");
     if (targettoload != "" && !waitingforserverconnection)
     {
         // note to self: should shift this comparison into WorldPersist really
         WorldPersistToXml.GetInstance().Load(targettoload);
         targettoload = "";
     }
     ProcessWorld();
     if (Tick != null)
     {
         Tick();
     }
     network.Tick();
 }
Beispiel #5
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,
            }
Beispiel #6
0
            public void Go()
            {
                net = new NetworkLevel2Controller();
                net.ConnectAsClient("127.0.0.1", 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);

                while (true)
                {
                    net.Tick();
                    //net.ConnectionToServer.Send( 'P', Encoding.ASCII.GetBytes( "sample data " + i.ToString() ) );
                    Thread.Sleep(50);
                    //    i++;
                }
            }
Beispiel #7
0
            public void Go()
            {
                net = new NetworkLevel2Controller();
                net.ConnectAsClient("127.0.0.1", 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);

                while (true)
                {
                    net.Tick();
                    //net.ConnectionToServer.Send( 'P', Encoding.ASCII.GetBytes( "sample data " + i.ToString() ) );
                    Thread.Sleep(50);
                //    i++;
                }
            }
Beispiel #8
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);
     }
 }
Beispiel #9
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,
            }
Beispiel #10
0
            public void Go()
            {
                network = new NetworkLevel2Controller();
                network.ConnectAsClient(serveraddress, serverport);
                network.NewConnection += new Level2NewConnectionHandler(network_NewConnection);

                while (true)
                {
                    network.Tick();
                    Thread.Sleep(50);
                }
            }