stop method
Stops serving and releases the event source / broker / control connections.
Implementation
Future<void> stop() async {
_queuePoll?.cancel();
_queuePoll = null;
for (final c in _sseClients.toList()) {
try {
await c.close();
} catch (_) {}
}
_sseClients.clear();
await _server?.close(force: true);
_server = null;
await state.close();
await source.close();
await broker?.close();
await control?.close();
await events?.close();
await backend?.close();
}