I don't think that would be all that sexy at all.
You have to realize, that sendfile() is meant as an optimization, by
being able to re-use the same buffers that act as the in-kernel page
cache as buffers for sending data. So you avoid one copy.
However, for socket->socket, we would not have such an advantage. A
socket->socket sendfile() would not avoid any copies the way the
networking is done today. That _may_ change, of course. But it might
not. And I'd rather tell people using sendfile() that you get EINVAL if
it isn't able to optimize the transfer..
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/