当前位置: 首页>>代码示例>>C#>>正文


C# IValueReader.ReadBytes方法代码示例

本文整理汇总了C#中IValueReader.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadBytes方法的具体用法?C# IValueReader.ReadBytes怎么用?C# IValueReader.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IValueReader的用法示例。


在下文中一共展示了IValueReader.ReadBytes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     base.ReadPayload(reader);
     var internalEndPointAddress = new IPAddress(reader.ReadBytes());
     InternalOwnEndPoint = new IPEndPoint(internalEndPointAddress, reader.ReadInt32());
     var externalEndPointAddress = new IPAddress(reader.ReadBytes());
     ExternalPeerEndPoint = new IPEndPoint(externalEndPointAddress, reader.ReadInt32());
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:8,代码来源:RequestIntroducerIntroductionMessage.cs

示例2: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     var ms = new MemoryStream(reader.ReadBytes());
     ScreenFrame = new Bitmap(ms);
 }
开发者ID:erpframework,项目名称:screenshare,代码行数:5,代码来源:ScreenFrameResponseMessage.cs

示例3: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     base.ReadPayload(reader);
     var endPointAddress = new IPAddress(reader.ReadBytes());
     InternalClientEndPoint = new IPEndPoint(endPointAddress, reader.ReadInt32());
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:6,代码来源:RequestIntroducerRegistrationMessage.cs

示例4: Deserialize

        public void Deserialize(IValueReader reader, RSACrypto crypto)
        {
            if (reader == null)
                throw new ArgumentNullException ("reader");
            if (crypto == null)
                throw new ArgumentNullException ("crypto");

            if (reader.ReadBool())
            {
                byte[] exponent = crypto.Decrypt (reader.ReadBytes());

                byte[] modulus1 = crypto.Decrypt (reader.ReadBytes());
                byte[] modulus2 = crypto.Decrypt (reader.ReadBytes());
                byte[] modulus = modulus1.Concat (modulus2).ToArray();

                this.exponentOffset = modulus.Length;
                this.publicKey = new byte[exponent.Length + modulus.Length];
                Buffer.BlockCopy (modulus, 0, this.publicKey, 0, modulus.Length);
                Buffer.BlockCopy (exponent, 0, this.publicKey, exponentOffset, exponent.Length);
            }

            SetupSignature();
        }
开发者ID:morpheusllc,项目名称:Tempest,代码行数:23,代码来源:RSAAsymmetricKey.cs

示例5: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     OriginalMessageId = reader.ReadUInt16();
     Count = reader.ReadByte();
     Payload = reader.ReadBytes();
 }
开发者ID:ermau,项目名称:Tempest,代码行数:6,代码来源:PartialMessage.cs

示例6: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            SourceId = reader.ReadInt32 ();
            Sequence = reader.ReadInt32();

            byte frames = reader.ReadByte();
            Data = new byte[frames][];

            for (int i = 0; i < frames; ++i)
                Data[i] = reader.ReadBytes();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:ServerAudioDataMessage.cs

示例7: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     AESKey = reader.ReadBytes();
     PublicAuthenticationKeyType = Type.GetType (reader.ReadString());
     PublicAuthenticationKey = reader.ReadBytes();
 }
开发者ID:strager,项目名称:Tempest,代码行数:6,代码来源:FinalConnectMessage.cs

示例8: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            this.TargetType = (TargetType)reader.ReadByte();

            ushort numTargets = reader.ReadUInt16();
            int[] targets = new int[numTargets];
            for (int i = 0; i < targets.Length; ++i)
                targets[i] = reader.ReadInt32();

            TargetIds = targets;

            Sequence = reader.ReadInt32();
            SourceId = reader.ReadInt32();

            byte frames = reader.ReadByte();
            Data = new byte[frames][];

            for (int i = 0; i < frames; ++i)
                Data[i] = reader.ReadBytes();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:20,代码来源:ClientAudioDataMessage.cs


注:本文中的IValueReader.ReadBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。