stop method
Stop the server and close all connections.
Implementation
Future<void> stop() async {
await _rpcServer?.stop();
await _wsController?.close();
await _httpServer?.close(force: true);
_httpServer = null;
_rpcServer = null;
_sessions.clear();
_endpointSessions.clear();
await _recordController.close();
await _connectionController.close();
controller.dispose();
}