Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SimpleSendfile – Zero-Copy File Sending

Lean: Hale.SimpleSendfile | Haskell: simple-sendfile

Efficient file sending using sendfile(2) syscall for zero-copy transfer, with read+send fallback.

Key Types

structure FilePart where
  offset : Nat
  count  : Nat

API

FunctionDescription
sendFileSend file (or portion) over connected socket

Files

  • Hale/SimpleSendfile/Network/Sendfile.lean – sendFile, FilePart