static NetErrorHelper() { NetErrorHelper.niceStrings = new Dictionary <NetError, string>(Enum.GetValues(typeof(NetError)).Length); NetErrorHelper.CacheNiceStrings(); uLink.NetworkConnectionError networkConnectionError = uLink.NetworkConnectionError.NoError; IEnumerator enumerator = Enum.GetValues(typeof(uLink.NetworkConnectionError)).GetEnumerator(); try { while (enumerator.MoveNext()) { object current = enumerator.Current; if ((int)current >= (int)networkConnectionError) { continue; } networkConnectionError = (uLink.NetworkConnectionError)((int)current); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable == null) { } disposable.Dispose(); } if (networkConnectionError != uLink.NetworkConnectionError.InternalDirectConnectFailed) { Debug.LogWarning(string.Concat(new object[] { "Most Negative Base ", networkConnectionError, " (", (int)networkConnectionError, ")" })); } }
public void uLink_OnFailedToConnect(uLink.NetworkConnectionError error) { Printf("Unable to connect to the server: " + error); if (OnConnectToServerFailed != null) { OnConnectToServerFailed(error); } }
public static NetError ToNetError(this uLink.NetworkConnectionError error) { int num = (int)error; if (num < -5 && num >> 7 == -1) { num = num & 255; } return((NetError)num); }
public static NetError ToNetError(this uLink.NetworkConnectionError error) { int num = (int)error; if ((num < -5) && ((num >> 7) == -1)) { num &= 0xff; } return((NetError)num); }
// Token: 0x0600213A RID: 8506 RVA: 0x0007A654 File Offset: 0x00078854 public static global::NetError ToNetError(this uLink.NetworkConnectionError error) { int num = error; if (num < -5 && num >> 7 == -1) { num &= 255; } return((global::NetError)num); }
public void Connect(uLink.HostData hostData, string playerName) { isRedirected = false; uLink.NetworkConnectionError error = uLink.Network.Connect(hostData, "", playerName); if (error != uLink.NetworkConnectionError.NoError) { SendMessage("uLink_OnFailedToConnect", error); } }
private void uLink_OnFailedToConnect(uLink.NetworkConnectionError ulink_error) { this.LogDisconnect(ulink_error.ToNetError(), null); DisableOnConnectedState.OnDisconnected(); ConsoleSystem.Run("gameui.show", false); this.LoadBackground(); if (ulink_error.ToNetError() == NetError.NoError) { this.ShowInformation("Failed to connect."); } else { this.ShowInformation(string.Concat("Failed to connect (", ulink_error.ToNetError().ToString(), ")")); } LoadingScreen.Hide(); }
private void uLink_OnFailedToConnect(uLink.NetworkConnectionError ulink_error) { if (this.levelLoader) { UnityEngine.Object.Destroy(this.levelLoader); } if (!MainMenu.singleton) { NetError netError = ulink_error.ToNetError(); if (netError != NetError.NoError) { UnityEngine.Debug.LogError(netError.NiceString()); } } try { DisableOnConnectedState.OnDisconnected(); } finally { UnityEngine.Object.Destroy(base.gameObject); } }
// Token: 0x06002139 RID: 8505 RVA: 0x0007A56C File Offset: 0x0007876C static NetErrorHelper() { global::NetErrorHelper.CacheNiceStrings(); uLink.NetworkConnectionError networkConnectionError = 0; foreach (object obj in Enum.GetValues(typeof(uLink.NetworkConnectionError))) { if ((int)obj < networkConnectionError) { networkConnectionError = (int)obj; } } if (networkConnectionError != -5) { Debug.LogWarning(string.Concat(new object[] { "Most Negative Base ", networkConnectionError, " (", networkConnectionError, ")" })); } }