network-run 0.4.1 → 0.4.2
raw patch · 3 files changed
+35/−35 lines, 3 filesdep ~time-managerPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: time-manager
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- Network/Run/TCP/Timeout.hs +4/−8
- network-run.cabal +27/−27
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for network-run +## 0.4.2++* Using `withHandle` of time-manager.+ ## 0.4.1 * Make sure to cancel Handles.
Network/Run/TCP/Timeout.hs view
@@ -53,13 +53,9 @@ -> IO a runTCPServerWithSocket tm sock server = withSocketsDo $ do T.withManager (tm * 1000000) $ \mgr -> forever $- E.bracketOnError (accept sock) (close . fst) $- \(conn, _peer) ->- void $- forkFinally- (labelMe "TCP timeout server" >> server' mgr conn)- (const $ gclose conn)+ E.bracketOnError (accept sock) (close . fst) $ \(conn, _peer) ->+ void $ forkFinally (server' mgr conn) (const $ gclose conn) where server' mgr conn = do- E.bracket (T.registerKillThread mgr $ return ()) T.cancel $ \th ->- server mgr th conn+ labelMe "TCP timeout server"+ T.withHandle mgr (return ()) $ \th -> server mgr th conn
network-run.cabal view
@@ -1,30 +1,30 @@-name: network-run-version: 0.4.1-synopsis: Simple network runner library-description: Simple functions to run network clients and servers.--- bug-reports:-license: BSD3-license-file: LICENSE-author: Kazu Yamamoto-maintainer: kazu@iij.ad.jp-category: Network-build-type: Simple-extra-source-files: CHANGELOG.md-cabal-version: >=1.10+cabal-version: >=1.10+name: network-run+version: 0.4.2+license: BSD3+license-file: LICENSE+maintainer: kazu@iij.ad.jp+author: Kazu Yamamoto+synopsis: Simple network runner library+description: Simple functions to run network clients and servers.+category: Network+build-type: Simple+extra-source-files: CHANGELOG.md +source-repository head+ type: git+ location: https://github.com/kazu-yamamoto/network-run+ library- exposed-modules: Network.Run.TCP- Network.Run.TCP.Timeout- Network.Run.UDP- other-modules: Network.Run.Core- -- other-extensions:- build-depends: base >= 4 && < 5- , bytestring- , network >= 3.2.4- , time-manager- -- hs-source-dirs:- default-language: Haskell2010+ exposed-modules:+ Network.Run.TCP+ Network.Run.TCP.Timeout+ Network.Run.UDP -source-repository head- type: git- location: https://github.com/kazu-yamamoto/network-run+ other-modules: Network.Run.Core+ default-language: Haskell2010+ build-depends:+ base >=4 && <5,+ bytestring,+ network >=3.2.4,+ time-manager >=0.1.3 && <0.2