streamly-0.8.3: Dataflow programming and declarative concurrency
Copyright(c) 2019 Composewell Technologies
LicenseBSD3
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Streamly.Internal.FileSystem.FDIO

Description

Low level IO routines interfacing the operating system.

Synopsis

Documentation

write :: FD -> Ptr Word8 -> Int -> CSize -> IO CInt Source #

write FD buffer offset length tries to write data on the given filesystem fd (cannot be a socket) up to sepcified length starting from the given offset in the buffer. The write will not block the OS thread, it may suspend the Haskell thread until write can proceed. Returns the actual amount of data written.

writeAll :: FD -> Ptr Word8 -> Int -> IO () Source #

Keep writing in a loop until all data in the buffer has been written.

writev :: FD -> Ptr IOVec -> Int -> IO CInt Source #

write FD iovec count tries to write data on the given filesystem fd (cannot be a socket) from an iovec with specified number of entries. The write will not block the OS thread, it may suspend the Haskell thread until write can proceed. Returns the actual amount of data written.

writevAll :: FD -> Ptr IOVec -> Int -> IO () Source #

Keep writing an iovec in a loop until all the iovec entries are written.