Наследование: System.EventArgs
Пример #1
0
        public void OnDisconnecte(object sender, ConnectionEventArgs e)
        {
            //      Logger.Trace("Client disconnected: {0}", e.Connection.ToString());
            //   playerHandler.RemovePlayerFromGame((IOClient)e.Connection.Client);

            try
            {
                lock (ConnectionLock)
                    Connections.Remove(e.Connection);
            }
            catch { }

            Console.WriteLine("Connections C: " + Connections.Count);
            //  playerHandler.removePlayerClient(e.Connection.Client);
        }
Пример #2
0
 protected virtual void OnClientDisconnect(ConnectionEventArgs e)
 {
     var handler = OnDisconnect;
     if (handler != null) handler(this, e);
 }
Пример #3
0
        public void OnConnecte(object sender, ConnectionEventArgs e)
        {
            //      Logger.Trace("Game-Client connected: {0}", e.Connection.ToString());

            var gameClient = new IOClient(e.Connection);
            e.Connection.Client = gameClient;
            e.Connection.Client.keepalive = Program.tickcount.ElapsedMilliseconds;
            Console.WriteLine("Connections O: " + Connections.Count);
            //  playerHandler.newPlayerClient(gameClient);
        }