packages feed

distributed-process-simplelocalnet 0.2.3.3 → 0.2.4

raw patch · 4 files changed

+21/−14 lines, 4 filesdep ~distributed-processdep ~network-multicastdep ~network-transportPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: distributed-process, network-multicast, network-transport, network-transport-tcp

API changes (from Hackage documentation)

Files

ChangeLog view
@@ -1,3 +1,7 @@+2017-08-22  Facundo Domínguez <facundo.dominguezy@tweag.io>  0.2.4++* Update dependency bounds to build with ghc-8.2.1.+ 2016-10-13  Facundo Domínguez <facundo.dominguezy@tweag.io>  0.2.3.3  * Update dependency bounds.
distributed-process-simplelocalnet.cabal view
@@ -1,5 +1,5 @@ Name:          distributed-process-simplelocalnet-Version:       0.2.3.3+Version:       0.2.4 Cabal-Version: >=1.8 Build-Type:    Simple License:       BSD3@@ -31,14 +31,14 @@   Build-Depends:     base >= 4.4 && < 5,                      bytestring >= 0.9 && < 0.11,                      network >= 2.3 && < 2.7,-                     network-multicast >= 0.1.1 && < 0.2,+                     network-multicast >= 0.1.1 && < 0.3,                      data-accessor >= 0.2 && < 0.3,                      binary >= 0.6.3 && < 0.9,                      containers >= 0.4 && < 0.6,                      transformers >= 0.2 && < 0.6,-                     network-transport >= 0.4.1.0 && < 0.5,-                     network-transport-tcp >= 0.4 && < 0.6,-                     distributed-process >= 0.5.0 && < 0.7+                     network-transport >= 0.4.1.0 && < 0.6,+                     network-transport-tcp >= 0.4 && < 0.7,+                     distributed-process >= 0.5.0 && < 0.8   Exposed-modules:   Control.Distributed.Process.Backend.SimpleLocalnet,                      Control.Distributed.Process.Backend.SimpleLocalnet.Internal.Multicast   Extensions:        RankNTypes,@@ -49,18 +49,21 @@  Executable TestSimpleLocalnet   Main-Is:           TestSimpleLocalnet.hs+  Other-Modules:+    Control.Distributed.Process.Backend.SimpleLocalnet+    Control.Distributed.Process.Backend.SimpleLocalnet.Internal.Multicast   If flag(build-example)     Build-Depends:     base >= 4.4 && < 5,                        bytestring >= 0.9 && < 0.11,                        network >= 2.3 && < 2.7,-                       network-multicast >= 0.0 && < 0.2,+                       network-multicast >= 0.0 && < 0.3,                        data-accessor >= 0.2 && < 0.3,                        binary >= 0.5 && < 0.9,                        containers >= 0.4 && < 0.6,                        transformers >= 0.2 && < 0.6,-                       network-transport >= 0.4.1.0 && < 0.5,-                       network-transport-tcp >= 0.4 && < 0.6,-                       distributed-process >= 0.5.0 && < 0.7+                       network-transport >= 0.4.1.0 && < 0.6,+                       network-transport-tcp >= 0.4 && < 0.7,+                       distributed-process >= 0.5.0 && < 0.8   Else     Buildable: False   Extensions:        RankNTypes,
src/Control/Distributed/Process/Backend/SimpleLocalnet.hs view
@@ -174,7 +174,8 @@ -- | Initialize the backend initializeBackend :: N.HostName -> N.ServiceName -> RemoteTable -> IO Backend initializeBackend host port rtable = do-  mTransport   <- NT.createTransport host port NT.defaultTCPParameters+  mTransport   <- NT.createTransport host port (\sn -> (host, sn))+                                     NT.defaultTCPParameters   (recv, sendp) <- initMulticast  "224.0.0.99" 9999 1024   (_, backendState) <- fixIO $ \ ~(tid, _) -> do     backendState <- newMVar BackendState
src/Control/Distributed/Process/Backend/SimpleLocalnet/Internal/Multicast.hs view
@@ -2,7 +2,6 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} module Control.Distributed.Process.Backend.SimpleLocalnet.Internal.Multicast (initMulticast) where -import Data.Function (on) import Data.Map (Map) import qualified Data.Map as Map (empty) import Data.Binary (Binary, decode, encode)@@ -22,7 +21,7 @@ import Control.Applicative ((<$>)) import Network.Socket (HostName, PortNumber, Socket, SockAddr) import qualified Network.Socket.ByteString as NBS (recvFrom, sendManyTo)-import Network.Transport.Internal (decodeInt32, encodeInt32)+import Network.Transport.Internal (decodeNum32, encodeEnum32) import Network.Multicast (multicastSender, multicastReceiver)  --------------------------------------------------------------------------------@@ -52,7 +51,7 @@     writer :: forall a. Binary a => Socket -> SockAddr -> a -> IO ()     writer sock addr val = do       let bytes = encode val-          len   = encodeInt32 (BSL.length bytes)+          len   = encodeEnum32 (BSL.length bytes)       NBS.sendManyTo sock (len : BSL.toChunks bytes) addr  --------------------------------------------------------------------------------@@ -86,7 +85,7 @@                -> IO (BSL.ByteString, SockAddr) recvWithLength sock st bufferSize = do   (len, addr) <- recvExact sock 4 st bufferSize-  let n = decodeInt32 . BSS.concat . BSL.toChunks $ len+  let n = decodeNum32 . BSS.concat . BSL.toChunks $ len   bytes <- recvExactFrom addr sock n st bufferSize   return (bytes, addr)