06-09-2023 12:48 PM - edited 06-09-2023 01:12 PM
Using a TCP server, I'm attempting to read from a client once a second. I don't care about the data between reading from the client, but it causes overload for the buffer. How do I avoid this / drop the data?
06-09-2023 03:32 PM
I'm not sure what you are trying to do (are you running code on the Server or the Client? Where is LabVIEW involved in all this?) Please attach your LabVIEW code (not static pictures that cannot be edited and m.odified), preferably for a "previous version" if you are running LabVIEW 22 or higher.
Bob Schor
06-09-2023 04:25 PM
Since you don't have your code attached, I will share with you what I think may be a potential problem.
Let me ask first, when are you getting error 63? Is it as soon as you start your program or later on? If you are getting it as soon as you start your program, make sure the block diagram that you are using to send the data does not run before the block diagram that is receiving data.
Start by running the block diagram that is supposed to receive data, then run the one that is going to send the data.
Try this above and let us know. If it does not work, attach your code.
06-10-2023 02:23 AM
@helpwanted wrote:
Using a TCP server, I'm attempting to read from a client once a second. I don't care about the data between reading from the client, but it causes overload for the buffer. How do I avoid this / drop the data?
You need to provide significantly more detail.
So you are using TCP, not UDP, right? Is each "reading" a new connection or are you keeping the connection going between read? Is the other side only sending on demand or continuously?
Are both sides LabVIEW programs you wrote?
Are you possibly confusing the terms "server" and "client"? Typically a client reads from a server, not vice versa. Who initiates the connection? How? What is the format of the response?
What kind of error messages do you get?
can you share some code?
06-12-2023 07:59 AM
It's a TCP server opens connections through an initialization case, and keeps connections open, it then loops through the connections to send/receive data from each client. The server is being used to both send and receive data. The clients are sending data faster than the server can receive it and that is where the error is occurring. I want a client-side solution that drops data until the client writes to the server. The error 63 occurs after running the program presumably due to data build up on client side. My server is both sending and receiving data, so I cannot set it to strictly read. Both sides of the connection are lab view scripts that I have wrote or edited from LabVIEW examples. I'm using a TCP multiple connections server with read/ write privileges.
06-12-2023 08:37 AM
If both sides are LabVIEW code, you have full control how much the clients are sending. We probably need to see some code.
06-12-2023 09:40 AM
Do you acknowledge packages sent? If so, don't send the next until you've recieved acknowledge on the current.