tcp_splice_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tcp_splice_read(9) β€” a Kernel API Manual moment ✨

okay bestie, so this one lives in the Kernel API Manual and honestly it's giving "small function, big job" energy. let's get into it 🫢


✨ NAME ✨

tcp_splice_read β€” splice data from TCP socket to a pipe 🌈

like, it takes the data chilling in your TCP socket and yeets it straight into a pipe. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

ssize_t tcp_splice_read (struct socket *sock , loff_t *ppos , struct
       pipe_inode_info *pipe , size_t len , unsigned int flags );

that's the whole signature, copy it exactly, don't come for me 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sock β€” the socket you're splicing from, bestie. this is the source vibe πŸ’–
  • ppos β€” position β€” and listen, it's not valid. like, at all. the manpage literally says so πŸ™ˆ
  • pipe β€” the pipe you're splicing to. this is the destination, the main character of the receiving side πŸ‘‘
  • len β€” number of bytes to splice, i.e. how much you're moving over πŸ“
  • flags β€” splice modifier flags, the little knobs you can twist ⭐

🌸 DESCRIPTION 🌸

will read pages from the given socket and fill them into a pipe. that's it, that's the whole tea β˜• it's literally doing exactly what it says on the tin β€” pages come out of the socket, pages go into the pipe, everybody slays πŸ’…

ngl it's a short description because the function is a short description of itself. iconic behaviour, honestly ✨

🧚 SEE ALSO 🧚

  • Kernel file ./net/ipv4/tcp.c β€” go read it, iykyk πŸ“–

and that's the page!! this little gem comes to you from ./net/ipv4, dated October 2026 β€” catch you in the next release, bestie πŸ’œπŸ¦‹πŸ’–

πŸ“¦ where this page comes from