Example #1
0
        public void StopClient(uint clientID)
        {
            GameClient client = GetClient(clientID);

            if (client != null)
            {
                // Stop & drop connection
                IonEnvironment.GetTcpConnections().DropConnection(clientID);

                // Stop client
                client.Stop();

                // Drop client
                mClients.Remove(clientID);

                // Log event
                IonEnvironment.GetLog().WriteInformation("Stopped client " + clientID);
            }
        }
Example #2
0
 /// <summary>
 /// Constructs a GameClient instance for a given client ID.
 /// </summary>
 /// <param name="clientID">The ID of this client.</param>
 public GameClient(uint clientID)
 {
     mID             = clientID;
     mConnection     = IonEnvironment.GetTcpConnections().GetConnection(clientID);
     mMessageHandler = new ClientMessageHandler(this);
 }