My advance so far: I have used read() to read from a file in a given block size and put that data in a struct. What happens if my block size is bigger that the whole file I am reading from?
Will my struct be filled with the actual contents of the file and then random data will be added. or zeroes added?
The protocol I'm implementing splits a file in 60k blocks, and it identifies the last packet as one with less than 60k of data.
thnks
J