@@ -25,7 +25,7 @@ module Streamly.Internal.Network.Socket
2525 , connectFrom
2626
2727 -- * Read from connection
28− , readChunk
28+ , getChunk
2929
3030 -- ** Streams
3131 , read
@@ -40,7 +40,7 @@ module Streamly.Internal.Network.Socket
4040 , chunkReaderWith
4141
4242 -- * Write to connection
43− , writeChunk
43+ , putChunk
4444
4545 -- ** Folds
4646 , write
@@ -278,10 +278,10 @@ readArrayUptoWith f size h = do
278278-- becomes available. If data is available then it immediately returns that
279279-- data without blocking.
280280--
281−-- @since 0.8.0
282−{-# INLINABLE readChunk #-}
283−readChunk :: Int -> Socket -> IO (Array Word8)
284−readChunk = readArrayUptoWith recvBuf
281+-- @since 0.9.0
282+{-# INLINABLE getChunk #-}
283+getChunk :: Int -> Socket -> IO (Array Word8)
284+getChunk = readArrayUptoWith recvBuf
285285
286286-------------------------------------------------------------------------------
287287-- Array IO (output)
@@ -321,10 +321,10 @@ writeArrayWith f h arr = A.asPtrUnsafe arr $ \ptr -> f h (castPtr ptr) aLen
321321
322322-- | Write an Array to a file handle.
323323--
324−-- @since 0.8.0
325−{-# INLINABLE writeChunk #-}
326−writeChunk :: Unboxed a => Socket -> Array a -> IO ()
327−writeChunk = writeArrayWith sendAll
324+-- @since 0.9.0
325+{-# INLINABLE putChunk #-}
326+putChunk :: Unboxed a => Socket -> Array a -> IO ()
327+putChunk = writeArrayWith sendAll
328328
329329-------------------------------------------------------------------------------
330330-- Stream of Arrays IO
@@ -354,7 +354,7 @@ readChunksWith size h = S.fromStreamD (D.Stream step ())
354354 where
355355 {-# INLINE_LATE step #-}
356356 step _ _ = do
357− arr <- liftIO $ readChunk size h
357+ arr <- liftIO $ getChunk size h
358358 return $
359359 case A.length arr of
360360 0 -> D.Stop
@@ -382,7 +382,7 @@ chunkReaderWith = Unfold step return
382382 where
383383 {-# INLINE_LATE step #-}
384384 step (size, h) = do
385− arr <- liftIO $ readChunk size h
385+ arr <- liftIO $ getChunk size h
386386 return $
387387 case A.length arr of
388388 0 -> D.Stop
@@ -462,7 +462,7 @@ reader = UF.first defaultChunkSize readerWith
462462{-# INLINE putChunks #-}
463463putChunks :: (MonadIO m, Unboxed a)
464464 => Socket -> Stream m (Array a) -> m ()
465−putChunks h = S.fold (FL.drainBy (liftIO . writeChunk h))
465+putChunks h = S.fold (FL.drainBy (liftIO . putChunk h))
466466
467467-- | Write a stream of arrays to a socket. Each array in the stream is written
468468-- to the socket as a separate IO request.
@@ -470,7 +470,7 @@ putChunks h = S.fold (FL.drainBy (liftIO . writeChunk h))
470470-- @since 0.7.0
471471{-# INLINE writeChunks #-}
472472writeChunks :: (MonadIO m, Unboxed a) => Socket -> Fold m (Array a) ()
473−writeChunks h = FL.drainBy (liftIO . writeChunk h)
473+writeChunks h = FL.drainBy (liftIO . putChunk h)
474474
475475-- | @writeChunksWith bufsize socket@ writes a stream of arrays to
476476-- @socket@ after coalescing the adjacent arrays in chunks of @bufsize@.