public int Deserialize(byte[] buffer, int offset, int end)
{
byte header = buffer.ReadUInt8(offset++);
if ((MessageType)(header >> 4) != MessageType.SegmentAck)
throw new Exception("Could not deserialize an unconfirmed request message");
this.Nack = (header & 0x02) > 0;
this.Server = (header & 0x01) > 0;
this.InvokeId = buffer.ReadUInt8(offset++);
this.SequenceNumber = buffer.ReadUInt8(offset++);
this.ActualWindowSize = buffer.ReadUInt8(offset++);
return offset;
}