Callback invoked when the WebSocket connection is closed.
Function(int? code, String? reaso)? onClose;