/// <summary> /// Runs in the background of the game (another thread), polls for new updates /// from the clients. /// </summary> private void ProcessEvents() { while (Status == ServerStatus.Running) { // Poll for new events _netServer.PollEvents(); // Wait Thread.Sleep(15); } }
/// <summary> /// Runs in the background of the game (another thread), polls for new updates /// from the server. /// </summary> private void ProcessEvents() { // Run this loop while we are connected or if we are still trying to connect. while (Status == ClientStatus.Connected || Status == ClientStatus.Connecting) { // Poll for new events _netClient.PollEvents(); // Wait Thread.Sleep(15); } }
/// <summary> /// Polls new events from the server. /// </summary> public void ProcessEvents() { // Poll for new events _netClient.PollEvents(); }
/// <summary> /// Polls new events from the clients. /// </summary> public void ProcessEvents() { // Poll for new events _netServer.PollEvents(); }