subscribe method

Future<Subscribed> subscribe(
  1. String topic, {
  2. SubscribeOptions? options,
})

This subscribes the session to a topic. The subscriber may pass options while subscribing. The resulting events are passed to the Subscribed.eventStream. The subscriber should therefore subscribe to that stream to receive the events.

Implementation

Future<Subscribed> subscribe(String topic, {SubscribeOptions? options}) {
  return _subscribe(topic, options: options);
}