chickadee » sendfile » impl:read-write-loop/port

impl:read-write-loop/port src dst lenprocedure

Sends a file by performing repeated reads and writes where the source is a port. source is the input-port. destination is the filedescriptor of an already opened file (can be a socket). len is the size of the file in bytes as e.g. retrieved by (file-size). This procedure returns the amount of bytes successfully written.