Chunking incoming WS messages

This commit is contained in:
Marcel Mraz 2024-12-29 21:19:11 +01:00
parent 1abb901ec2
commit 12be5d716b
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
6 changed files with 405 additions and 173 deletions

View file

@ -9,6 +9,18 @@ export type PUSH_PAYLOAD = {
export type CLIENT_INCREMENT = StoreIncrement;
export type CLIENT_MESSAGE_METADATA = {
id: string;
order: number;
count: number;
};
export type CLIENT_MESSAGE_RAW = {
type: "relay" | "pull" | "push";
payload: string;
chunkInfo: CLIENT_MESSAGE_METADATA;
};
export type CLIENT_MESSAGE =
| { type: "relay"; payload: RELAY_PAYLOAD }
| { type: "pull"; payload: PULL_PAYLOAD }