Well, that's right, I could still use the sendfile() interface. If I
would like to implement sendfile() for socket -> [file|socket], would
it be possible to do something like in the following pseudocode:
if srcfd is socket then
s = sock struct for srcfd
s->foo_member = dstfd
s->data_ready = my_data_ready
block until srcfd is closed
Where foo_member was added by me to the sock struct and my_data_ready
writes to dstfd before calling the default data_ready function. To
follow the sendfile() semantics I should add a max_forward or something
too. Btw, how would I accomplish the block until srcfd is closed, is
it possible (ok, anything is _possible_ but..)?
-- Joel Eriksson - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/