LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture more frames of WebSocket data

Solved!
Go to solution

Hi All,

 

I am currently using the WebSocket library to develop a handler for communicating with a Webserver and I am running into an issue where the response I want sometimes comes 1-2 frames after the request is made instead of directly following the Write request.

 

JackFFFF_0-1677112949466.png

Is there any way to set up a WebSocket listener then to capture all of the frames for a certain amount of time? I tried looping this section by rereading until the response contains the data I require but I could not get that to work.

 

Any advice or suggestions about how I could go about solving this? Also let me know if there is a better place to discuss these kind of issues!

 

 

0 Kudos
Message 1 of 2
(721 Views)
Solution
Accepted by topic author JackFFFF

As a followup I have been able to get the loop to work by sending corresponding ping-pong messages to the Webserver in between repeat reads. This does still cause an error if there is nothing there so I have to ignore passing it on but it seems to work fine now.

JackFFFF_0-1677210071552.png

 

0 Kudos
Message 2 of 2
(661 Views)