stop method

Future<void> stop()

Stops the mDNS discovery service

Implementation

Future<void> stop() async {
  if (!_isRunning) return;

  _subscription?.cancel();
  _subscription = null;

  _registry?.dispose();
  _registry = null;

  if (_client != null) {
    _client!.stop();
    _client = null;
  }

  _isRunning = false;
}