ptr-0.16.7: Abstractions for operations on pointers

Safe HaskellNone
LanguageHaskell2010

Ptr.Receive

Synopsis

Documentation

data Receive Source #

A wrapper of a receiving action, which extends it with bufferization.

peek :: Receive -> Peek peekd -> IO (Either Text peekd) Source #

Receive as many bytes as is required by the provided decoder and decode immediately.

If all you need is just to get a ByteString chunk then use the bytes decoder.