streaming-commons 0.1.5 → 0.1.6
raw patch · 4 files changed
+16/−1 lines, 4 files
Files
- ChangeLog.md +3/−0
- Data/Streaming/Network.hs +10/−0
- Data/Streaming/Network/Internal.hs +1/−0
- streaming-commons.cabal +2/−1
+ ChangeLog.md view
@@ -0,0 +1,3 @@+## 0.1.6++Provide `appCloseConnection` to get the underlying connection from an `AppData`.
Data/Streaming/Network.hs view
@@ -53,6 +53,7 @@ , appWrite , appSockAddr , appLocalAddr+ , appCloseConnection -- * Functions -- ** General , bindPortGen@@ -559,6 +560,7 @@ , appWrite' = sendAll socket , appSockAddr' = addr , appLocalAddr' = mlocal+ , appCloseConnection' = NS.sClose socket } in app ad@@ -573,6 +575,7 @@ , appWrite' = sendAll s , appSockAddr' = address , appLocalAddr' = Nothing+ , appCloseConnection' = NS.sClose s }) appLocalAddr :: AppData -> Maybe NS.SockAddr@@ -580,6 +583,13 @@ appSockAddr :: AppData -> NS.SockAddr appSockAddr = appSockAddr'++-- | Close the underlying connection. One possible use case is simulating+-- connection failures in a test suite.+--+-- Since 0.1.6+appCloseConnection :: AppData -> IO ()+appCloseConnection = appCloseConnection' class HasReadWrite a where readLens :: Functor f => (IO ByteString -> f (IO ByteString)) -> a -> f a
Data/Streaming/Network/Internal.hs view
@@ -111,4 +111,5 @@ , appWrite' :: !(ByteString -> IO ()) , appSockAddr' :: !SockAddr , appLocalAddr' :: !(Maybe SockAddr)+ , appCloseConnection' :: !(IO ()) }
streaming-commons.cabal view
@@ -1,5 +1,5 @@ name: streaming-commons-version: 0.1.5+version: 0.1.6 synopsis: Common lower-level functions needed by various streaming data libraries description: Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes. homepage: https://github.com/fpco/streaming-commons@@ -17,6 +17,7 @@ include/*.h cbits/*.c test/LICENSE.gz+ ChangeLog.md library exposed-modules: Data.Streaming.Blaze