无法从 websocket fyers 流式传输实时数据

Cannot stream live data from websocket fyers

提问人:ashish S 提问时间:11/11/2023 更新时间:11/11/2023 访问量:11

问:

我目前正在从事一个涉及实时数据分析的项目,我已经成功订阅,但无法流式传输数据。

 while (true)
 {
    
     byte[] buffer = new byte[1024];
     WebSocketReceiveResult result = await ws.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
     string receivedMessage = Encoding.UTF8.GetString(buffer, 0, result.Count);
     Console.WriteLine($"Received message: {receivedMessage}");
 }
 Console.WriteLine($"WebSocket State: {ws.State}");

}

我的输出

C# WebSocket

评论


答: 暂无答案