network-conduit 0.0.1 → 0.2.0
raw patch · 2 files changed
+16/−12 lines, 2 filesdep ~conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: conduit
API changes (from Hackage documentation)
Files
- Data/Conduit/Network.hs +14/−10
- network-conduit.cabal +2/−2
Data/Conduit/Network.hs view
@@ -16,12 +16,15 @@ -- -- Since 0.0.0 sourceSocket :: ResourceIO m => Socket -> Source m ByteString-sourceSocket socket = Source $ return $ PreparedSource- { sourcePull = do+sourceSocket socket =+ src+ where+ src = Source pull close++ pull = do bs <- liftIO (recv socket 4096)- return $ if S.null bs then Closed else Open bs- , sourceClose = return ()- }+ return $ if S.null bs then Closed else Open src bs+ close = return () -- | Stream data to the socket. --@@ -29,9 +32,10 @@ -- -- Since 0.0.0 sinkSocket :: ResourceIO m => Socket -> Sink ByteString m ()-sinkSocket socket = Sink $ return $ SinkData- { sinkPush = \bs -> do+sinkSocket socket =+ SinkData push close+ where+ push bs = do liftIO (sendAll socket bs)- return Processing- , sinkClose = return ()- }+ return (Processing push close)+ close = return ()
network-conduit.cabal view
@@ -1,5 +1,5 @@ Name: network-conduit-Version: 0.0.1+Version: 0.2.0 Synopsis: Stream socket data using conduits. Description: Stream socket data using conduits. License: BSD3@@ -19,7 +19,7 @@ Build-depends: base >= 4 && < 5 , transformers >= 0.2.2 && < 0.3 , bytestring >= 0.9- , conduit+ , conduit >= 0.2 if flag(network-bytestring) build-depends: network >= 2.2.1 && < 2.2.3 , network-bytestring >= 0.1.3 && < 0.1.4