Hello Dave
Thank you so much for sharing nice work. We are using snap7 on C++ in Ubuntu 18. I am working on a system that sometimes experience an overload on the network and CPU, and when that happens we have seen old data in TCP socket, so the new reading is actually taken bytes previous read operation. Please is there a way to clear the TCP socket on Client before send a new read request to guarantee no residual is left from previous operation ?
Thanks
Reyan
Last edit: Reyan 2024-06-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I tried also, seems a just temporary delay in network. I am not sure what to do, I will add a delay time of few seconds, when an error happened, following by close/open, to see if that fix it. So it is only adding delay before close/open again. Thanks
Last edit: Reyan 2024-07-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just wondering what approach does your code take 🤔.
Are you sending request and waits for result before sending the next one,
or maybe you asynchronously sending requests and then matches them with results?
I'm not sure if is it possible in Snap7
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Dave
Thank you so much for sharing nice work. We are using snap7 on C++ in Ubuntu 18. I am working on a system that sometimes experience an overload on the network and CPU, and when that happens we have seen old data in TCP socket, so the new reading is actually taken bytes previous read operation. Please is there a way to clear the TCP socket on Client before send a new read request to guarantee no residual is left from previous operation ?
Thanks
Reyan
Last edit: Reyan 2024-06-17
Did you try to close connection and then open again?
Yes, I tried also, seems a just temporary delay in network. I am not sure what to do, I will add a delay time of few seconds, when an error happened, following by close/open, to see if that fix it. So it is only adding delay before close/open again. Thanks
Last edit: Reyan 2024-07-04
I just wondering what approach does your code take 🤔.
Are you sending request and waits for result before sending the next one,
or maybe you asynchronously sending requests and then matches them with results?
I'm not sure if is it possible in Snap7
btw.
is that your repository 🤔 .
If yes, I appended pull request last year (not accepted yet)
I guess it might be useful for somebody