@@ -59,13 +59,13 @@ module Streamly.Internal.Network.Inet.TCP
59 -- , writeUtf8ByLines
59 -- , writeUtf8ByLines
60 -- , writeByFrames
60 -- , writeByFrames
61 , writeWithBufferOf
61 , writeWithBufferOf
62− , fromBytes
62+ , putBytes
63− , fromBytesWithBufferOf
63+ , putBytesWithBufferOf
65 -- -- * Array Write
65 -- -- * Array Write
66 -- , writeArray
66 -- , writeArray
67 , writeChunks
67 , writeChunks
68− , fromChunks
68+ , putChunks
70 -- ** Transformation
70 -- ** Transformation
71 , processBytes
71 , processBytes
@@ -332,15 +332,15 @@ toBytes addr port = AS.concat $ withConnection addr port ISK.toChunks
332-- number.
332-- number.
334-- @since 0.7.0
334-- @since 0.7.0
335−{-# INLINE fromChunks #-}
335+{-# INLINE putChunks #-}
336−fromChunks
336+putChunks
337 :: (MonadCatch m, MonadAsync m)
337 :: (MonadCatch m, MonadAsync m)
338 => (Word8, Word8, Word8, Word8)
338 => (Word8, Word8, Word8, Word8)
339 -> PortNumber
339 -> PortNumber
340 -> SerialT m (Array Word8)
340 -> SerialT m (Array Word8)
342−fromChunks addr port xs =
342+putChunks addr port xs =
343− S.drain $ withConnection addr port (\sk -> S.yieldM $ ISK.fromChunks sk xs)
343+ S.drain $ withConnection addr port (\sk -> S.yieldM $ ISK.putChunks sk xs)
345-- | Write a stream of arrays to the supplied IPv4 host address and port
345-- | Write a stream of arrays to the supplied IPv4 host address and port
346-- number.
346-- number.
@@ -373,15 +373,15 @@ writeChunks addr port = Fold step initial extract
373-- input elements.
373-- input elements.
375-- @since 0.7.0
375-- @since 0.7.0
376−{-# INLINE fromBytesWithBufferOf #-}
376+{-# INLINE putBytesWithBufferOf #-}
377−fromBytesWithBufferOf
377+putBytesWithBufferOf
378 :: (MonadCatch m, MonadAsync m)
378 :: (MonadCatch m, MonadAsync m)
380 -> (Word8, Word8, Word8, Word8)
380 -> (Word8, Word8, Word8, Word8)
381 -> PortNumber
381 -> PortNumber
382 -> SerialT m Word8
382 -> SerialT m Word8
384−fromBytesWithBufferOf n addr port m = fromChunks addr port $ AS.arraysOf n m
384+putBytesWithBufferOf n addr port m = putChunks addr port $ AS.arraysOf n m
386-- | Like 'write' but provides control over the write buffer. Output will
386-- | Like 'write' but provides control over the write buffer. Output will
387-- be written to the IO device as soon as we collect the specified number of
387-- be written to the IO device as soon as we collect the specified number of
@@ -401,10 +401,10 @@ writeWithBufferOf n addr port =
401-- | Write a stream to the supplied IPv4 host address and port number.
401-- | Write a stream to the supplied IPv4 host address and port number.
403-- @since 0.7.0
403-- @since 0.7.0
404−{-# INLINE fromBytes #-}
404+{-# INLINE putBytes #-}
405−fromBytes :: (MonadCatch m, MonadAsync m)
405+putBytes :: (MonadCatch m, MonadAsync m)
406 => (Word8, Word8, Word8, Word8) -> PortNumber -> SerialT m Word8 -> m ()
406 => (Word8, Word8, Word8, Word8) -> PortNumber -> SerialT m Word8 -> m ()
407−fromBytes = fromBytesWithBufferOf defaultChunkSize
407+putBytes = putBytesWithBufferOf defaultChunkSize
409-- | Write a stream to the supplied IPv4 host address and port number.
409-- | Write a stream to the supplied IPv4 host address and port number.
@@ -432,7 +432,7 @@ withInputConnect addr port input f = S.bracket pre post handler
434 sk <- liftIO $ connect addr port
434 sk <- liftIO $ connect addr port
435− tid <- fork (ISK.fromBytes sk input)
435+ tid <- fork (ISK.putBytes sk input)
436 return (sk, tid)
436 return (sk, tid)
438 handler (sk, _) = f sk
438 handler (sk, _) = f sk