Finding EOF/length of a binary file during FoE transfer is hard if you can't rule out a single byte to use as foe_cfg.empty_write.
With a length argument you can add up to get the file length and when length < foe_cfg.buffer_size this was the last data packet (FOE_fclose) which can trigger handling of the received file.
Finding EOF/length of a binary file during FoE transfer is hard if you can't rule out a single byte to use as foe_cfg.empty_write.
With a length argument you can add up to get the file length and when length < foe_cfg.buffer_size this was the last data packet (FOE_fclose) which can trigger handling of the received file.