attach method

Future<void> attach()

Attach to this channel ensuring the channel is created in the Ably system and all messages published on the channel are received by any channel listeners registered using RealtimeChannel.subscribe.

Any resulting channel state change will be emitted to any listeners registered using the RealtimeChannel.on stream. As a convenience, attach() is called implicitly if RealtimeChannel.subscribe for the channel is called, or RealtimePresence.enter or RealtimePresence.subscribe are called on the RealtimePresence object for this channel.

Implementation

Future<void> attach() => invoke(PlatformMethod.attachRealtimeChannel, {
      TxTransportKeys.channelName: _channelName,
    });