public override void OnClientConnect(NetworkConnection conn) { CallbackLog($"OnClientConnect({conn})"); ClientConnectEvent?.Invoke(this, EventArgs.Empty); // NOTE: do not call the base method }
public override void OnLobbyClientConnect(NetworkConnection conn) { Debug.Log("LobbyManager : OnLobbyClientConnect"); if (ClientConnectEvent != null) { ClientConnectEvent.Invoke(); } }
public override void OnClientDisconnect(NetworkConnection conn) { Debug.LogWarning("[NetworkManagerBase::OnClientDisconnect] ConnectionError: " + conn.lastError); if (conn.lastError == NetworkError.Timeout && doAutoReconnect) { StopAllCoroutines(); StartCoroutine(WaitAndConnect(1f)); OnClientReconnectEvent.Invoke(conn); } else { OnClientDisconnectEvent.Invoke(conn); base.OnClientDisconnect(conn); } }
private void OnClientConnectInternal(RawClient client, ConnectEventArgs args) { bool ok = false; lock ( m_Clients ) { if (!m_Clients.Contains(client)) { m_Clients.Add(client); ok = true; } } if (ok) { OnClientConnect(client, args); if (ClientConnectEvent != null) { ClientConnectEvent.Invoke(client, args); } } }
public override void OnClientConnect(NetworkConnection conn) { base.OnClientConnect(conn); ClientConnect.Invoke(conn); }
public override void OnClientConnect(NetworkConnection conn) { print("[NetworkManagerBase::OnClientConnect]"); OnClientConnectEvent.Invoke(conn); base.OnClientConnect(conn); }