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


C# ByteBuffer.GetUInt16方法代码示例

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


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

示例1: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ChannelMax = buffer.GetUInt16();
     FrameMax = buffer.GetUInt32();
     Heartbeat = buffer.GetUInt16();
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ConnectionTuneBody.cs

示例2: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     ClassId = buffer.GetUInt16();
     MethodId = buffer.GetUInt16();
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:8,代码来源:ConnectionCloseBody.cs

示例3: PopulateFromBuffer

 public void PopulateFromBuffer(ByteBuffer buffer, uint size)
 {     
     ClassId = buffer.GetUInt16();
     Weight = buffer.GetUInt16();
     BodySize = buffer.GetUInt64();
     ushort propertyFlags = buffer.GetUInt16();
     ContentHeaderPropertiesFactory factory = ContentHeaderPropertiesFactory.GetInstance();
     Properties = factory.CreateContentHeaderProperties(ClassId, propertyFlags, buffer);    
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:9,代码来源:ContentHeaderBody.cs

示例4: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     Details = EncodingUtils.ReadFieldTable(buffer);
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ChannelAlertBody.cs

示例5: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     PrefetchSize = buffer.GetUInt32();
     PrefetchCount = buffer.GetUInt16();
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Global = bools[0];
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:FileQosBody.cs

示例6: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Queue = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Nowait = bools[0];
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:QueuePurgeBody.cs

示例7: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     Exchange = EncodingUtils.ReadShortString(buffer);
     RoutingKey = EncodingUtils.ReadShortString(buffer);
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:8,代码来源:StreamReturnBody.cs

示例8: Decodable

        public MessageDecoderResult Decodable(ByteBuffer input)
        {
            if (_disabled)
            {
                return MessageDecoderResult.NOT_OK;
            }
            // final +1 represents the command end which we know we must require even
            // if there is an empty body
            if (input.Remaining < 1)
            {
                return MessageDecoderResult.NEED_DATA;
            }
            byte type = input.GetByte();

            // we have to check this isn't a protocol initiation frame here - we can't tell later on and we end up
            // waiting for more data. This could be improved if MINA supported some kind of state awareness when decoding
            if ((char)type == 'A')
            {
                _logger.Error("Received what appears to be a protocol initiation frame");
                return MessageDecoderResult.NOT_OK;
            }
            // zero, channel, body size and end byte
            if (input.Remaining < (1 + 2 + 4 + 1))
            {
                return MessageDecoderResult.NEED_DATA;
            }

            int channel = input.GetUInt16();
            long bodySize = input.GetUInt32();            

            // bodySize can be zero
            if (type <= 0 || channel < 0 || bodySize < 0)
            {
                _logger.Error(String.Format("Error decoding frame: Type={0}, Channel={1}, BodySize={2}", type, channel, bodySize));                
                return MessageDecoderResult.NOT_OK;
            }

            if (input.Remaining < (bodySize + 1))
            {
                return MessageDecoderResult.NEED_DATA;
            }

            if (IsSupportedFrameType(type))
            {
                if (_logger.IsDebugEnabled)
                {
                    // we have read 7 bytes so far, so output 7 + bodysize + 1 (for end byte) to get complete data block size
                    // this logging statement is useful when looking at exactly what size of data is coming in/out
                    // the broker
                    _logger.Debug("Able to decode data block of size " + (bodySize + 8));
                }
                return MessageDecoderResult.OK;
            }
            else
            {
                return MessageDecoderResult.NOT_OK;
            }
        }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:58,代码来源:AMQDataBlockDecoder.cs

示例9: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Integer1 = buffer.GetByte();
     Integer2 = buffer.GetUInt16();
     Integer3 = buffer.GetUInt32();
     Integer4 = buffer.GetUInt64();
     Operation = buffer.GetByte();
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:9,代码来源:TestIntegerBody.cs

示例10: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Exchange = EncodingUtils.ReadShortString(buffer);
     RoutingKey = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Mandatory = bools[0];
     Immediate = bools[1];
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:9,代码来源:BasicPublishBody.cs

示例11: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Queue = EncodingUtils.ReadShortString(buffer);
     Exchange = EncodingUtils.ReadShortString(buffer);
     RoutingKey = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Nowait = bools[0];
     Arguments = EncodingUtils.ReadFieldTable(buffer);
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:10,代码来源:QueueBindBody.cs

示例12: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Queue = EncodingUtils.ReadShortString(buffer);
     ConsumerTag = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);NoLocal = bools[0];
     Exclusive = bools[1];
     Nowait = bools[2];
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:10,代码来源:StreamConsumeBody.cs

示例13: PopulateMethodBodyFromBuffer

 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Queue = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Passive = bools[0];
     Durable = bools[1];
     Exclusive = bools[2];
     AutoDelete = bools[3];
     Nowait = bools[4];
     Arguments = EncodingUtils.ReadFieldTable(buffer);
     		 
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:12,代码来源:QueueDeclareBody.cs

示例14: CreateBody

 /// <summary>
 /// Creates the body.
 /// </summary>
 /// <param name="inbuf">The ByteBuffer containing data from the network</param>
 /// <returns></returns>
 /// <exception>AMQFrameDecodingException</exception>
 public IBody CreateBody(ByteBuffer inbuf)
 {
    return MethodBodyDecoderRegistry.Get(inbuf.GetUInt16(), inbuf.GetUInt16());
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:10,代码来源:AMQMethodBodyFactory.cs

示例15: ReadUnsignedShort

 public static ushort ReadUnsignedShort(ByteBuffer buffer)
 {
    return buffer.GetUInt16();
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:4,代码来源:EncodingUtils.cs


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