sendfile()
can be used to transmit data from a "file" descriptor to a "socket" descriptor in order to get data from machine A to machine B. Is it possible to get the data at the receiving end from the "socket" descriptor to a file with similar zero-copy semantics? I think sendfile()
doesn't help here because sendfile()
needs the source of data to be "page/buffer" cache. Is my understanding correct? Can splice()
help in this situation?