subscribeOnUpdates method

  1. @override
Stream<SerializableModel> subscribeOnUpdates({
  1. required String channel,
})
override

Opens the server-side update stream for channel.

One stream per channel; the connection is the streams, so subscribing is connecting and the last cancellation disconnects. Called by DwSocketService, never by an app directly.

Implementation

@override
Stream<SerializableModel> subscribeOnUpdates({required String channel}) =>
    answerSubscribe?.call(channel) ??
    Stream<SerializableModel>.fromFuture(
      Completer<SerializableModel>().future,
    );