
22 Apr
2005
22 Apr
'05
8:39 p.m.
Peter Simons wrote:
hPutBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
You have these in GHC.IO at the moment.
I know. ;-)
These are also rather more difficult to implement than the single-byte versions, so I can't see nhc98 or Hugs implementing them any time soon.
What is difficult to implement about these functions? Aren't they just wrappers for read(2) and write(2)?
I would expect them to be essentially wrappers for fread() and
fwrite() (i.e. the stream's buffering is used), except with a single
byte-count argument instead of separate element-size and element-count
arguments.
--
Glynn Clements