public void OnTick() { network.Tick(); netreplicationcontroller.Tick(); if (Tick != null) { Tick(); } }
public void Go() { network = new NetworkLevel2Controller(); network.ConnectAsClient(serveraddress, serverport); network.NewConnection += new Level2NewConnectionHandler(network_NewConnection); while (true) { network.Tick(); Thread.Sleep(50); } }
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); } }
//! 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(); }
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, }
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++; } }