Skip to main content

Module poke_chunk

Module poke_chunk 

Source
Expand description

The binary poke chunks of protocol 52 and later. Between pokeStart and pokeEnd zero-cache may send a poke’s parts as binary messages instead of pokePart messages: each is a MESSAGE_TYPE byte and then the next bytes of the UTF-8 JSON of a PokePartBody[]. A chunk can end inside a UTF-8 sequence.

Constants§

MESSAGE_TYPE
POKE_CHUNK_MESSAGE_TYPE.
PROTOCOL_VERSION
POKE_CHUNK_PROTOCOL_VERSION.

Functions§

decode
Decodes the payloads of a poke’s chunks, in order, into its parts (decodePokeChunks): strict UTF-8, a leading BOM dropped as TextDecoder does, then pokePartsSchema.
payload
The payload of a binary message. Fails for a message of another type, which the client treats as an invalid message.