public GameClient(long id, SocketsConnection connection, Revision revision, Crypto crypto) { this.ID = id; this.connection = connection; this.MachineID = ""; this.Revision = revision; this.LastPong = Stopwatch.StartNew(); this.DataHandlers = new OrderedDictionary(); this.MessageHandlers = new OrderedDictionary(); if (!Skylight.ExternalFlashPolicyFileRequestPortEnabled) //If the policy file is requested from external port the flash is not requesting it again from the actual game port { this.AddDataHandler(PrivacyPolicyRequestHandler.Handler); } if (!Skylight.MultiRevisionSupportEnabled) { this.Revision = Skylight.Revision; } if (this.Revision != Revision.None && (Skylight.MultiRevisionSupportEnabled && crypto != Crypto.NONE)) { this.EnableDecodeHandlers(); } else { this.AddDataHandler(new DetectRevisionHandler()); } }
public void Connection(SocketsConnection connection, Revision revision, Crypto crypto) { GameClient gameClient = new GameClient(connection.GetID(), connection, revision, crypto); this.Clients.Add(connection.GetID(), gameClient); gameClient.Start(); }