I want to write a c program that keeps reading a file and whenever a new line is added to that file, its sent across network (lets assume via tcp) to recipient.
What is the best way to do it?
o keep the file open and do something like tail -F on it to keep reading?
o read file on my own?
I am not worried about sending on network part, I need to have best way of getting a new line out of the file. On that line I might do some filtering too before sending.