Skip to content

Commit 289beb8

Browse files
committed
Exempt META messages from the delta stream
1 parent 5764bdd commit 289beb8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

textile/features.textile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ h3(#realtime-channel). RealtimeChannel
785785
** @(RTL18b)@ Discard the message
786786
** @(RTL18c)@ Send an @ATTACH@ @ProtocolMessage@ with the @channelSerial@ set to the previous message to the message for which "vcdiff" decoding failed to the server, transitioning the channel state to @ATTACHING@, and waiting for a confirmation @ATTACHED@, as per @RTL4c@ and @RTL4f@. @ChannelStateChange.reason@ should be set to @ErrorInfo@ object with with code 40018.
787787
* @(RTL19)@ The data payload of the last message on each channel must be stored at all times since it will be needed to decode any subsequent message that has a "vcdiff" encoding step. The stored value is the "base payload" of the most recent message; this is the @data@ member of the message, in string or binary form, once all application-level encoding steps have been applied. The base payload is derived initially by processing a non-delta message; the processing and bookkeeping rules are as follows:
788+
** @(RTL19d)@ Base payloads are only stored for messages (that is, with a @ProtocolMessage.action@ of @MESSAGE@), which have a @Message.action@ which is not @META@
788789
** @(RTL19a)@ When processing any message (whether a delta or a full message), if the message @encoding@ string ends in @base64@, the message @data@ should be base64-decoded (and the @encoding@ string modified accordingly per "RSL6":#RSL6).
789790
** @(RTL19b)@ In the case of a non-delta message, the resulting @data@ value is stored as the base payload.
790791
** @(RTL19c)@ In the case of a delta message with a @vcdiff@ @encoding@ step, the @vcdiff@ decoder must be used to decode the base payload of the of delta message, applying that delta to the stored base payload. The direct result of that vcdiff delta application, before performing any further decoding steps, is stored as the updated base payload.

0 commit comments

Comments
 (0)