Interface MessageStatic

Static utilities related to messages.

Hierarchy

  • MessageStatic

Properties

fromEncoded: ((JsonObject, channelOptions?) => Promise<InboundMessage>)

Type declaration

    • (JsonObject, channelOptions?): Promise<InboundMessage>
    • A static factory method to create an InboundMessage object from a deserialized InboundMessage-like object encoded using Ably's wire protocol.

      Parameters

      • JsonObject: any

        A InboundMessage-like deserialized object.

      • Optional channelOptions: ChannelOptions

        A ChannelOptions object. If you have an encrypted channel, use this to allow the library to decrypt the data.

      Returns Promise<InboundMessage>

      A promise which will be fulfilled with an InboundMessage object.

fromEncodedArray: ((JsonArray, channelOptions?) => Promise<InboundMessage[]>)

Type declaration

    • (JsonArray, channelOptions?): Promise<InboundMessage[]>
    • A static factory method to create an array of InboundMessage objects from an array of deserialized InboundMessage-like object encoded using Ably's wire protocol.

      Parameters

      • JsonArray: any[]

        An array of InboundMessage-like deserialized objects.

      • Optional channelOptions: ChannelOptions

        A ChannelOptions object. If you have an encrypted channel, use this to allow the library to decrypt the data.

      Returns Promise<InboundMessage[]>

      A promise which will be fulfilled with an array of InboundMessage objects.

Generated using TypeDoc