private void OnClientConnectionDropped(object sender, NetComms.ConnectionEventArgs e) { // Get the player GUID var playerGuid = (Guid?)e.Connection.AssociatedData ?? Guid.Empty; Logger.Log($"NetServerWorld.OnClientConnectionDropped - lost {playerGuid}"); // Lock while updating game state lock (WorldLock) { Players.Players.RemoveAll(p => p.Guid == playerGuid); State.Astronauts.RemoveAll(a => a.Guid == playerGuid); } }
private void OnClientNewConnection(object sender, NetComms.ConnectionEventArgs e) { Logger.Log("NetServerWorld.OnClientNewConnection - new client"); }
private void OnServerConnectionDropped(object sender, NetComms.ConnectionEventArgs e) { Logger.Log("NetClientWorld.OnServerConnectionDropped"); }