stopServer method
Stops the WebSocket server and audio player.
This method closes the WebSocket server to stop receiving new connections and stops the audio playback.
Implementation
Future<void> stopServer() async {
await _server.close(); // Close the WebSocket server.
await audioChunkPlayer.stop(); // Stop the audio playback.
debugPrint('WebSocket server stopped'); // Log the server stop event.
}