API reference / @evolu/common / Evolu/Protocol / createProtocolMessageFromCrdtMessages
Function: createProtocolMessageFromCrdtMessages()
function createProtocolMessageFromCrdtMessages(
deps,
): (owner, messages, maxSize?) => ProtocolMessage;
Defined in: packages/common/src/Evolu/Protocol.ts:437
Creates a ProtocolMessage from CRDT messages.
If the message size would exceed defaultProtocolMessageMaxSize, the protocol ensures all messages will be sent in the next round(s) even over unidirectional and stateless transports.
Parameters
| Parameter | Type |
|---|---|
deps | RandomBytesDep & SymmetricCryptoDep |
Returns
(
owner,
messages,
maxSize?): ProtocolMessage;
Parameters
| Parameter | Type |
|---|---|
owner | Owner |
messages | readonly [CrdtMessage, CrdtMessage] |
maxSize? | number & Brand<"Int"> & Brand<"Between1000000-100000000"> |