Not recieving messages in flutter after successful websocket connection

if i send ping iam getting pong` i am not getting morket feeds , i want to know if market feed will be only available in market hrs ? if we connect after market hrs what will be message from websocket?

import 'package:web_socket/web_socket.dart';     
try {
      final socket = await WebSocket.connect(Uri.parse(wssUrl));
      print('Connected to WebSocket: $wssUrl');

      final subscriptionMessage = jsonEncode({
        'guid': params.guid,
        'method': params.method,
        'data': {
          'mode': params.data.mode,
          'instrumentKeys': params.data.instrumentKeys,
        },
      });
      socket.sendText(subscriptionMessage);
      print('Sent subscription message: $subscriptionMessage');

      // Listen to WebSocket events
      socket.events.listen((event) {
        switch (event) {
          case TextDataReceived(text: final text):
            try {
              print('Received WebSocket message: $text');
              // Decode the received message and parse it
              final decodedMarketData =
                  MarketFullFeed.fromBuffer(utf8.encode(text));
              controller.add(decodedMarketData);
            } catch (e) {
              print('Error decoding WebSocket message: $e');
              controller.addError('Error decoding WebSocket message: $e');
            }
            break;

          case BinaryDataReceived(data: final data):
            print('Unexpected binary data received: $data');
            break;

          case CloseReceived(code: final code, reason: final reason):
            print('WebSocket closed: Code $code, Reason: $reason');
            controller.close();
            break;

          default:
            print('Unhandled WebSocket event: $event');
        }
      }, onError: (error) {
        print('WebSocket error: $error');
        controller.addError('WebSocket error: $error');
      }, onDone: () {
        print('WebSocket connection closed.');
        controller.close();
      });

      // Yield the stream
      yield* controller.stream;
    } catch (e) {
      print('Error connecting to WebSocket: $e');
      throw Exception('Error connecting to WebSocket: $e');
    } 

No feeds will be available after market hours. During off-market hours, you will receive only a single tick, which will be the last tick.

Should I use a websocket client which support Authorization header? Iam already using ‘feed/market-data-feed/authorize’ link to get my wss url.

Obtaining the link to the WSS URL will also work.

With this below code i could able to get the wss url and able to connect with a

Status Code:
101 Switching Protocols

but not recieving any message,

 final encodedUpstoxUri = Uri(
      scheme: 'https',
      host: 'api.upstox.com',
      path: '/v2/feed/portfolio-stream-feed/authorize',
      queryParameters: {'update_types': params},
    );
    final upstoxHeaders = {
      'Authorization': 'Bearer $accessToken',
      'Content-Type': 'application/json',
    };

    final wssUriResponse = await http.get(
      encodedUpstoxUri,
      headers: upstoxHeaders,
    );

    if (wssUriResponse.statusCode == 200) {
      final decodedJson =
          jsonDecode(wssUriResponse.body) as Map<String, dynamic>;
      wssUrl = decodedJson['data']['authorizedRedirectUri'];
    } else {
      throw Exception(
          'Failed to get Upstox redirect URI: ${wssUriResponse.reasonPhrase}');
    }

should i use Atuhorization and Accept headers again to connect with the recieved wss url obtained from ```
https://api.upstox.com/v2/feed/portfolio-stream-feed/authorize