Пример #1
0
 /// <summary>
 /// Construct a new field table.
 /// </summary>
 /// <param name="buffer">the buffer from which to read data. The length byte must be read already</param>
 /// <param name="length">the length of the field table. Must be > 0.</param>
 public FieldTable(ByteBuffer buffer, uint length) : this()
 {
    _encodedForm = buffer.Slice();
    _encodedForm.Limit = (int)length;
    _encodedSize = length;
    buffer.Skip((int)length);
 }
Пример #2
0
 public void PopulateFromBuffer(ByteBuffer buffer, uint size)
 {
     if (size > 0)
     {
         _payload = buffer.Slice();
         _payload.Limit = (int)size;
         buffer.Skip((int)size);
     }
 }