I'm not completely sure how to implement this with a video feed from a webcam and i'm just looking for some advice on how to go about the logic.
Any input or direction to something similar
would be greatly appreciated.
I am trying to download a csv file from a website at regular intervals. I do this with the following code (that is in a function that is called every 5 seconds):
The cl client is instantiated in setup. The first time this file is downloaded succesfully (it gets the data) but then I get this error: "java.net.SocketException: Broken pipe" and every subsequent attempt to write to the client fails. I have read that this socket exception implies that the connection has been broken so my attempt to solve this was to instantiate the client each time the function gets called (as opposed to just once in the set up). However this just does nothing at the moment - i.e not even the first file download from the website works.
Any suggestions as to how to deal with this please?