I have an application that is recording live , the capture file keep growing in size using fread() and feof() , but feof() is breaking the loop early , so what's the best technique to keep reading from the stream
the code will have to read the file , build a packet and send it packaging and sending is going well with fixed size files
I would monitor the file (something like select(2)
). When notified, I would read
as much as possible then wait again.