LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP read returns new data with huge delay

Solved!
Go to solution

Hello,

 

I made a server application using LabView. The application translates simplified data from one device and translates them into more complex protocol with another party. The problem is, that the responses initiated by my app take too long. I tried to analyze the response times in wireshark, and the network adapter accepts the data at given time, but the labview function "TCP/IP read" returns them with delay, sometimes several seconds.

 

The application is using the async calls to execute the communication modules for each client parallel.

0 Kudos
Message 1 of 5
(2,755 Views)

How long is the TCP Timeout? What mode are you using for the TCP Read? Can you share your code, or a screenshot of the relevant section? If you are asking for more bytes than you are receiving, and you're using the default mode, then it will wait until the timeout before returning any data.

0 Kudos
Message 2 of 5
(2,735 Views)
Solution
Accepted by topic author Bublina

I had a common tcp/ip read function nonreentrant for all the cloned communication modules, so they were blocking the execution for each other Smiley Frustrated (facepalm).

Message 3 of 5
(2,732 Views)

@Bublina wrote:

I had a common tcp/ip read function nonreentrant for all the cloned communication modules, so they were blocking the execution for each other Smiley Frustrated (facepalm).


It's like a badge of honor.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(2,717 Views)

@billko wrote:

@Bublina wrote:

I had a common tcp/ip read function nonreentrant for all the cloned communication modules, so they were blocking the execution for each other Smiley Frustrated (facepalm).


It's like a badge of honor.  😉


I just hate when it happens, because I know I went through that code before and fixed all thse kinds of deadlocks, but some debugging probably forced me to change the execution system.

0 Kudos
Message 5 of 5
(2,704 Views)