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


C# IValueWriter.WriteBytes方法代码示例

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


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

示例1: WritePayload

 public override void WritePayload(IValueWriter writer)
 {
     base.WritePayload(writer);
     writer.WriteBytes(InternalOwnEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(InternalOwnEndPoint.Port);
     writer.WriteBytes(ExternalPeerEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(ExternalPeerEndPoint.Port);
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:8,代码来源:RequestIntroducerIntroductionMessage.cs

示例2: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     using (var ms = new MemoryStream())
     {
         ScreenFrame.Save(ms, ImageFormat.Png);
         writer.WriteBytes(ms.GetBuffer());
     }
 }
开发者ID:erpframework,项目名称:screenshare,代码行数:8,代码来源:ScreenFrameResponseMessage.cs

示例3: Serialize

        public void Serialize(ISerializationContext context, IValueWriter writer)
        {
            if (!writer.WriteBool (this.publicKey != null))
                return;

            writer.WriteBytes (this.publicKey);
            writer.WriteInt32 (this.exponentOffset);
        }
开发者ID:morpheusllc,项目名称:Tempest,代码行数:8,代码来源:RSAAsymmetricKey.cs

示例4: WritePayload

        public override void WritePayload(ISerializationContext context, IValueWriter writer)
        {
            writer.WriteInt32 (SourceId);
            writer.WriteInt32 (Sequence);

            writer.WriteByte ((byte)Data.Length);
            for (int i = 0; i < Data.Length; ++i)
                writer.WriteBytes (Data[i]);
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:9,代码来源:ServerAudioDataMessage.cs

示例5: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteUInt16 (OriginalMessageId);
     writer.WriteByte (Count);
     writer.WriteBytes (Payload, this.offset, this.length);
 }
开发者ID:ermau,项目名称:Tempest,代码行数:6,代码来源:PartialMessage.cs

示例6: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteBytes (AESKey);
     writer.WriteString (PublicAuthenticationKeyType.GetSimpleName());
     writer.WriteBytes (PublicAuthenticationKey);
 }
开发者ID:strager,项目名称:Tempest,代码行数:6,代码来源:FinalConnectMessage.cs

示例7: Serialize

        public void Serialize(ISerializationContext context, IValueWriter writer, IAsymmetricCrypto crypto)
        {
            if (!writer.WriteBool (this.publicKey != null))
                return;

            writer.WriteBytes (crypto.Encrypt (Exponent));

            int first = this.Modulus.Length / 2;
            writer.WriteBytes (crypto.Encrypt (Modulus.Copy (0, first)));
            writer.WriteBytes (crypto.Encrypt (Modulus.Copy (first, Modulus.Length - first)));
        }
开发者ID:ermau,项目名称:Tempest,代码行数:11,代码来源:RSAAsymmetricKey.cs

示例8: Serialize

        public void Serialize(IValueWriter writer, IPublicKeyCrypto crypto)
        {
            if (writer.WriteBool (D != null))
            {
                writer.WriteBytes (crypto.Encrypt (D));
                writer.WriteBytes (crypto.Encrypt (DP));
                writer.WriteBytes (crypto.Encrypt (DQ));
                writer.WriteBytes (crypto.Encrypt (InverseQ));
                writer.WriteBytes (crypto.Encrypt (P));
                writer.WriteBytes (crypto.Encrypt (Q));
            }

            if (writer.WriteBool (this.publicKey != null))
            {
                writer.WriteBytes (crypto.Encrypt (Exponent));

                int first = Modulus.Length / 2;
                writer.WriteBytes (crypto.Encrypt (Modulus.Copy (0, first)));
                writer.WriteBytes (crypto.Encrypt (Modulus.Copy (first, Modulus.Length - first)));
            }
        }
开发者ID:strager,项目名称:Tempest,代码行数:21,代码来源:RSAAsymmetricKey.cs

示例9: WritePayload

 public override void WritePayload(IValueWriter writer)
 {
     base.WritePayload(writer);
     writer.WriteBytes(RegisteredEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(RegisteredEndPoint.Port);
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:6,代码来源:ResponseIntroducerRegistrationMessage.cs


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