-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Peer-to-peer node discovery for Cloud Haskell -- -- Bootstraps a peer-to-peer connection network from a set of known -- hosts. @package distributed-process-p2p @version 0.1.0.0 -- | Peer-to-peer node discovery backend for Cloud Haskell based on the TCP -- transport. Provided with a known node address it discovers and -- maintains the knowledge of it's peers. -- --
--   import qualified Control.Distributed.Backend.P2P as P2P
--   import           Control.Monad.Trans (liftIO)
--   import           Control.Concurrent (threadDelay)
--   
--   main = P2P.bootstrap "myhostname" "9001" (P2P.makeNodeId "seedhost:9000") $ do
--       liftIO $ threadDelay 1000000 -- give dispatcher a second to discover other nodes
--       P2P.nsendPeers "myService" ("some", "message")
--   
module Control.Distributed.Backend.P2P -- | Start a peerController process and aquire connections to a swarm. bootstrap :: String -> String -> [NodeId] -> Process () -> IO () -- | Make a NodeId from host:port string. makeNodeId :: String -> NodeId -- | Get a list of currently available peer nodes. getPeers :: Process [NodeId] -- | Broadcast a message to a specific service on all peers. nsendPeers :: Serializable a => String -> a -> Process () instance Typeable QueryMessage instance Typeable PeerMessage instance Eq QueryMessage instance Show QueryMessage instance Eq PeerMessage instance Show PeerMessage instance Binary PeerMessage instance Binary QueryMessage