Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5355

TCP_DATAREADY event slows down TCP data

$
0
0

 

I'm working on some Labwindows/CVI code that communicates with an embedded device using the TCP libarary.

The CVI code is a client that sends requests for data to the embedded server.

 

The request / response happens in a timer callback.

The code does not use the TCP library callback TCP_DATAREADY event to collect the data.  This event has no code in it.

Rather the code running in the timer callback calls ClientTCPWrite(...) to send the request to the server.
Then it waits in a loop and uses calls to ClientTCPRead(...) to collect the response data as quickly as possible.

 

Most of the time this works well.  The TCP_DATAREADY never gets called.

However sometimes, if I do something with the user interface,  like drag a window around or something it gets into a situation where it starts

calling the TCP_DATAREADY very rapidly.  This has the effect of slowing things waaaay down.  No data is read in the TCP_DATAREADY callback so it eventually gets all the data in the loop in the timer callback.

 

Is there any way to shut off calls to TCP_DATAREADY?

 

Or is there a better way to set this up?

 

Thanks,
Kirk

 


Viewing all articles
Browse latest Browse all 5355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>