Why this weird API? I dunno, I would expect exactly two functions, one for sending a "file", and one for receiving whatever is new in the inbound queue, with the abstraction taking care of delivering the enqueued files to their destination!? And maybe a callback API so I don't have to poll for new inbound "files". Also, I'd expect the abstraction to provide an ordered, lossless stream, rather than some weird "file sync" which seems to lack all reordering and replay protection?