subscribe method

StompUnsubscribe subscribe({
  1. required String destination,
  2. required StompFrameCallback callback,
  3. Map<String, String>? headers,
})

Implementation

StompUnsubscribe subscribe({
  required String destination,
  required StompFrameCallback callback,
  Map<String, String>? headers,
}) {
  final handler = _handler;
  if (handler == null) {
    throw StompBadStateException(
      'The StompHandler was null. '
      'Did you forget calling activate() on the client?',
    );
  }

  return handler.subscribe(
    destination: destination,
    callback: callback,
    headers: headers,
  );
}