Skip to content

Commit e328e38

Browse files
committed
1. Updated spec for calculating Message size for @name@ and @clientId@
2. Added spec for calculating Presence message size
1 parent 59b42e9 commit e328e38

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

textile/features.textile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,8 @@ h4. Message
14541454
** @(TM6b)@ The size of an @Object@ or @Array@ @data@ property is its string length after being JSON-stringified
14551455
** @(TM6c)@ The size of a @binary@ @data@ property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use)
14561456
** @(TM6f)@ The size of a @string@ @data@ property is its length
1457+
** @(TM6g)@ The size of a @string@ @name@ property is its length
1458+
** @(TM6h)@ The size of a @string@ @clientId@ property is its length
14571459
** @(TM6d)@ The size of the @extras@ property is the string length of its JSON representation
14581460
** @(TM6e)@ The size of a @null@ or omitted property is zero
14591461
* @(TM7)@ The SDK may expose a series of functions (static factory methods on a Message or otherwise, wherever is language idiomatic; for some languages this might just be types that can be used for type assertions, etc), that take a deserialized @JsonObject@, one of the aggregated summaries for a particular annotation type (that is, a value from the @TM2q@ @summary@ @Dict@), and outputs a strongly-typed summary entry, for ease of use by the end user (particularly in languages where manipulating plain objects is difficult).
@@ -1496,7 +1498,13 @@ h4. PresenceMessage
14961498
** @(TP3g)@ @timestamp@ time in milliseconds since epoch. If a presence message received from Ably does not contain a @timestamp@, it should be set to the @timestamp@ of the encapsulating @ProtocolMessage@
14971499
** @(TP3h)@ @memberKey@ string function that combines the @connectionId@ and @clientId@ ensuring multiple connected clients with the same clientId are uniquely identifiable
14981500
* @(TP4)@ @fromEncoded@ and @fromEncodedArray@ are alternative constructors that take an (already deserialized) @PresenceMessage@-like object (or array of such objects), and optionally a @channelOptions@, and return a @PresenceMessage@ (or array of such @PresenceMessages@) that's decoded and decrypted as specified in @RSL6@, using the cipher in the @channelOptions@ if the message is encrypted, with any residual transforms (ones that the library cannot decode or decrypt) left in the @encoding@ property per @RSL6b@. This is intended for users receiving messages other than from a REST or Realtime channel (for example, from a queue), to avoid them having to parse the @encoding@ string themselves. This behaviour is the same as in @(TM3)@.
1499-
* @(TP5)@ The size of the @PresenceMessage@ for "TO3l8":#TO3l8 is calculated in the same way as for @Message@; see "TM6":#TM6
1501+
* @(TP5)@ The size of the @PresenceMessage@ for "TO3l8":#TO3l8 is calculated as follows:
1502+
** @(TM5a)@ The size is the sum of the sizes of the @data@ and @clientId@ properties
1503+
** @(TM5b)@ The size of an @Object@ or @Array@ @data@ property is its string length after being JSON-stringified
1504+
** @(TM5c)@ The size of a @binary@ @data@ property is its size in bytes (of the actual binary, not the base64 representation, regardless of whether the binary protocol is in use)
1505+
** @(TM6d)@ The size of a @string@ @data@ property is its length
1506+
** @(TM6e)@ The size of a @string@ @clientId@ property is its length
1507+
** @(TM5f)@ The size of a @null@ or omitted property is zero
15001508

15011509
h4. ObjectMessage
15021510

0 commit comments

Comments
 (0)