Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On Linux, the system calls splice(2) and tee(2) are used to transfer data between two file descriptors. One or both of the file descriptors must be a pipe, according to documentation. Why? Can this be made to work with sockets? Does it work currently, or would kernel modifications be required?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Right now they just splice pipe buffers together; socket buffers (on Linux) are different animals, and drag kernel networking into it. Limiting it to AF_LOCAL sockets would simplify implementation at the cost of complicating validation — and you still probably have to deal with them being allocated and mapped via the network buffer management subsystem instead of from anonymous file buffers.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.