2.2.6 SectionBuffer
A SectionBuffer represents a fragment or section of a Message Packet (section 2.2.5). Operations R_StartReceive (Opnum 7) (section 3.1.4.7) and R_StartTransactionalReceive (Opnum 13) (section 3.1.4.13) fragment a Message Packet into an array of one or more SectionBuffer structures. The client concatenates these fragments to reconstruct a valid Message Packet. There can be up to two sections per message. A Message Packet is split into two sections only when a subset of the distinguished message body property is returned. The first section always contains the message body property up to the size requested.
-
typedef struct _SectionBuffer { SectionType SectionBufferType; DWORD SectionSizeAlloc; DWORD SectionSize; [unique, size_is(SectionSize)] byte* pSectionBuffer; } SectionBuffer;
SectionBufferType: MUST specify a type for the SectionBuffer structure that indicates whether the pSectionBuffer member contains the whole Message Packet or MUST indicate which section is contained. The SectionType (section 2.2.7) enumeration lists possible values. More details are specified in 2.2.7.
SectionSizeAlloc: MUST specify the original size (in bytes) of the part of the Message Packet that this SectionBuffer represents. When the SectionBuffer represents the first section of the message, this field specifies the size that the SectionBuffer would have been if the entire message body property were included. The difference between the values of the SectionSizeAlloc member and the SectionSize member represents the size of the message body that was not transferred.
-
If the SectionBufferType member value is stFullPacket, stBinarySecondSection, or stSrmpSecondSection, then the SectionSizeAlloc member value MUST be equal to the SectionSize member value.
-
If the SectionBufferType member value is stBinaryFirstSection or stSrmpFirstSection, then the SectionSizeAlloc member value MUST be equal to or greater than the SectionSize member value.
SectionSize: MUST be the size (in bytes) of the buffer pointed to by the pSectionBuffer member. The SectionSize member specifies the size of the part of the Message Packet contained in the pSectionBuffer member.
pSectionBuffer: MUST be a pointer to an array of bytes containing a section of the Message Packet.