public int Deserialize(byte[] buffer, int offset, int end)
{
byte header = buffer.ReadUInt8(offset++);
if ((MessageType)(header >> 4) != MessageType.ComplexAck)
throw new Exception("Could not deserialize an unconfirmed request message");
this.Segmented = (header & 0x08) > 0;
this.MoreFollows = (header & 0x04) > 0;
this.InvokeId = buffer.ReadUInt8(offset++);
if(this.Segmented)
{
this.SequenceNumber = buffer.ReadUInt8(offset++);
this.ProposedWindowSize = buffer.ReadUInt8(offset++);
}
this.ServiceChoice = buffer.ReadUInt8(offset++);
return offset;
}