Example #1
0
        public override void OnClientConnect(NetworkConnection conn)
        {
            CallbackLog($"OnClientConnect({conn})");

            ClientConnectEvent?.Invoke(this, EventArgs.Empty);

            // NOTE: do not call the base method
        }
Example #2
0
 public override void OnLobbyClientConnect(NetworkConnection conn)
 {
     Debug.Log("LobbyManager : OnLobbyClientConnect");
     if (ClientConnectEvent != null)
     {
         ClientConnectEvent.Invoke();
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
        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);
                }
            }
        }
Example #5
0
 public override void OnClientConnect(NetworkConnection conn)
 {
     base.OnClientConnect(conn);
     ClientConnect.Invoke(conn);
 }
Example #6
0
 public override void OnClientConnect(NetworkConnection conn)
 {
     print("[NetworkManagerBase::OnClientConnect]");
     OnClientConnectEvent.Invoke(conn);
     base.OnClientConnect(conn);
 }