コード例 #1
0
        void HandleEncryptResult(IPacketMsg packetMsg)
        {
            var encResult = new Msg <MsgChannelEncryptResult>(packetMsg);

            DebugLog.WriteLine("UFSClient", "Encryption result: {0}", encResult.Body.Result);

            if (encResult.Body.Result == EResult.OK)
            {
                connection.SetNetEncryptionFilter(new NetFilterEncryption(tempSessionKey));
            }

            steamClient.PostCallback(new ConnectedCallback(encResult.Body));
        }
コード例 #2
0
ファイル: UFSClient.cs プロジェクト: sherpic/SteamKit
        void HandleEncryptResult(IPacketMsg packetMsg)
        {
            var encResult = new Msg <MsgChannelEncryptResult>(packetMsg);

            DebugLog.WriteLine("UFSClient", "Encryption result: {0}", encResult.Body.Result);

            if (encResult.Body.Result == EResult.OK && pendingNetFilterEncryption != null)
            {
                Debug.Assert(pendingNetFilterEncryption != null);
                connection.SetNetEncryptionFilter(pendingNetFilterEncryption);

                pendingNetFilterEncryption = null;
                steamClient.PostCallback(new ConnectedCallback(encResult.Body));
            }
            else
            {
                DebugLog.WriteLine("UFSClient", "Encryption channel setup failed");
                connection.Disconnect();
            }
        }