コード例 #1
0
ファイル: GameClientManager.cs プロジェクト: Mereos/HabboEMU
        /// <summary>
        /// Creates the and start client.
        /// </summary>
        /// <param name="clientId">The client identifier.</param>
        /// <param name="connection">The connection.</param>
        internal void CreateAndStartClient(uint clientId, ConnectionInformation connection)
        {
            var gameClient = new GameClient(clientId, connection);

            Clients.AddOrUpdate(clientId, gameClient, (key, value) => gameClient);
            gameClient.StartConnection();
        }
コード例 #2
0
        public void CreateAndStartClient(int clientID, ConnectionInformation connection)
        {
            var Client = new GameClient(clientID, connection);

            if (_clients.TryAdd(Client.ConnectionId, Client))
            {
                Client.StartConnection();
            }
            else
            {
                connection.Dispose();
            }
        }
コード例 #3
0
ファイル: GameClientManager.cs プロジェクト: BjkGkh/Boon
 public void CreateAndStartClient(int clientID, ConnectionInformation connection)
 {
     GameClient Client = new GameClient(clientID, connection);
     if (this._clients.TryAdd(Client.ConnectionID, Client))
         Client.StartConnection();
     else
         connection.Dispose();
 }