API Reference / @evolu/common / Evolu/Protocol / ProtocolMessageBuffer

Interface: ProtocolMessageBuffer

Defined in: packages/common/src/Evolu/Protocol.ts:496

Mutable builder for constructing ProtocolMessage respecting size limits.

Properties

PropertyModifierTypeDescriptionDefined in
addMessagereadonly(message) => booleanAdd an encrypted message to the buffer. Returns false if adding would exceed size limits.packages/common/src/Evolu/Protocol.ts:501
addRangereadonly(range) => booleanAdds a range to the protocol message. Returns false if adding the range exceeds maxSize.packages/common/src/Evolu/Protocol.ts:508
getSizereadonly() => number & Brand<"Int"> & Brand<"NonNegative"> & Brand<"Positive">-packages/common/src/Evolu/Protocol.ts:525
hasEnoughSpaceForSplitRangereadonly() => booleanChecks if there is enough space left in the buffer. We want to skip processing the whole range in case there is no available space.packages/common/src/Evolu/Protocol.ts:521
unwrapreadonly() => ProtocolMessageFinalize and return the ProtocolMessage.packages/common/src/Evolu/Protocol.ts:513

Was this page helpful?