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
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
addMessage | readonly | (message ) => boolean | Add an encrypted message to the buffer. Returns false if adding would exceed size limits. | packages/common/src/Evolu/Protocol.ts:501 |
addRange | readonly | (range ) => boolean | Adds a range to the protocol message. Returns false if adding the range exceeds maxSize. | packages/common/src/Evolu/Protocol.ts:508 |
getSize | readonly | () => number & Brand <"Int" > & Brand <"NonNegative" > & Brand <"Positive" > | - | packages/common/src/Evolu/Protocol.ts:525 |
hasEnoughSpaceForSplitRange | readonly | () => boolean | Checks 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 |
unwrap | readonly | () => ProtocolMessage | Finalize and return the ProtocolMessage. | packages/common/src/Evolu/Protocol.ts:513 |