Skip to content

support Handle to Handle sendfile #4

Description

@joeyh

At least on Linux, sendfile(2) operates on fds, so it should be possible to have eg:

sendFile :: Handle -> Handle -> IO ()

I need this and noticed it was missing in the current API of this library, which assumes that at least one end is a Socket.

Use cases include eg, sending a file to stdout as an efficient implementation of cat.

By the way, you're also missing a way to receive a file from a Socket and send it to a Handle.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions