title: Is it possible to `splice()` from a socket to a buffer with "zero-copy"?
body: <p>Is it possible to <a href="http://man7.org/linux/man-pages/man2/splice.2.html" rel="nofollow"><code>splice()</code></a> from a socket to a buffer with "zero-copy"? If yes, how?</p>
  
  <hr>
  
  <p>The example code I found for <a href="http://man7.org/linux/man-pages/man2/splice.2.html" rel="nofollow"><code>splice()</code></a> has two steps (<a href="http://blog.superpat.com/2010/06/01/zero-copy-in-linux-with-sendfile-and-splice/" rel="nofollow">splice example code</a>):</p>
  
  <ol>
  <li>splice from socket to pipe</li>
  <li>splice from pipe to file descriptor</li>
  </ol>
  
  <p>Is there always going to be an intermediary step of using a pipe (i.e. you can't do a zero-copy operation into a buffer in user space)?</p>