COROIO: NNet::NActors::payload_alignment< T, typename > Struct Template Reference
COROIO
Loading...
Searching...
No Matches
NNet::NActors::payload_alignment< T, typename > Struct Template Reference

Wire alignment of the payload of T: T::PayloadAlignment if declared, else 1. More...

#include <messages.hpp>

Inheritance diagram for NNet::NActors::payload_alignment< T, typename >:

Detailed Description

template<typename T, typename = void>
struct NNet::NActors::payload_alignment< T, typename >

Wire alignment of the payload of T: T::PayloadAlignment if declared, else 1.

A type declares static constexpr size_t PayloadAlignment = N; (a power of two up to MaxPayloadAlignment) to get its payload at a stream offset that is a multiple of N: the writer puts zero padding after the header and stores its length in the top bits of THeader::MessageId. TZeroCopyEnvelopeReaderV2 keeps chunk addresses congruent to stream offsets modulo MaxPayloadAlignment, so the payload is N-aligned in memory; the other readers copy payloads into operator new memory. Frames of types without it are written exactly as before.


The documentation for this struct was generated from the following file: