07-29-2020 04:34 PM
I'm wondering if this is the best approach for an unstable/unreliable network connection.
My application occasionally sees very long file copy times and I have up to 16 units under test for which to copy. This presents a huge GUI lag as there's no timeout parameter I can use in CopyFile.
I'm thinking about putting that into a separate thread and then check for the thread to complete in a timer.
Sound reasonable?
07-30-2020 03:30 AM - edited 07-30-2020 03:32 AM
I would say it’s a valid approach. Of course it’s a bit of a workaround. It would be best to research the reason for the delay such as a possibly badly configured network setup. The IP protocol is pretty amazing in how it can recover even from pretty borked network setups but it may take significant time. Its original development purpose was military oriented and to provide reliable communication even with heavily damaged communication infrastructure that could dynamically change. Communication speed was not a concern initially and instantaneous turn-around times even less.
Of course those delays could be legitimate, such as other high burst data transfers over the same line or the remote device being overloaded, but workarounds without knowing the reason for them usually will come back later and bite your ass in some way!