ouroboros-network
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Diffusion.P2P

Contents

Description

This module is expected to be imported qualified (it will clash with the Ouroboros.Network.Diffusion.NonP2P).

Synopsis

Documentation

data TracersExtra ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData resolverError (m :: Type -> Type) Source #

P2P DiffusionTracers Extras

nullTracers :: forall (m :: Type -> Type) ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData resolverError. Applicative m => TracersExtra ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData resolverError m Source #

data ArgumentsExtra (m :: Type -> Type) Source #

P2P Arguments Extras

Constructors

ArgumentsExtra 

Fields

data AcceptedConnectionsLimit #

Policy which governs how to limit the number of accepted connections.

Constructors

AcceptedConnectionsLimit 

Fields

data ApplicationsExtra ntnAddr (m :: Type -> Type) a Source #

P2P Applications Extras

TODO: we need initiator only mode for Daedalus, there's no reason why it should run a node-to-node server side.

Constructors

ApplicationsExtra 

Fields

run :: Tracers RemoteAddress NodeToNodeVersion LocalAddress NodeToClientVersion IO -> TracersExtra RemoteAddress NodeToNodeVersion NodeToNodeVersionData LocalAddress NodeToClientVersion NodeToClientVersionData IOException IO -> Arguments IO Socket RemoteAddress LocalSocket LocalAddress -> ArgumentsExtra IO -> Applications RemoteAddress NodeToNodeVersion NodeToNodeVersionData LocalAddress NodeToClientVersion NodeToClientVersionData IO a -> ApplicationsExtra RemoteAddress IO a -> IO Void Source #

Main entry point for data diffusion service. It allows to:

  • connect to upstream peers;
  • accept connection from downstream peers, if run in InitiatorAndResponderDiffusionMode.
  • runs a local service which allows to use node-to-client protocol to obtain information from the running system. This is used by 'cardano-cli' or a wallet and a like local services.

data Interfaces ntnFd ntnAddr ntnVersion ntnVersionData ntcFd ntcAddr ntcVersion ntcVersionData resolver resolverError (m :: Type -> Type) Source #

Constructors

Interfaces 

Fields

runM Source #

Arguments

:: forall m ntnFd ntnAddr ntnVersion ntnVersionData ntcFd ntcAddr ntcVersion ntcVersionData resolver resolverError a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadEvaluate m, MonadFix m, MonadFork m, MonadLabelledSTM m, MonadTraceSTM m, MonadMask m, MonadThrow (STM m), MonadTime m, MonadTimer m, MonadMVar m, Typeable ntnAddr, Ord ntnAddr, Show ntnAddr, Hashable ntnAddr, Typeable ntnVersion, Ord ntnVersion, Show ntnVersion, Show ntnVersionData, Typeable ntcAddr, Ord ntcAddr, Show ntcAddr, Ord ntcVersion, Exception resolverError) 
=> Interfaces ntnFd ntnAddr ntnVersion ntnVersionData ntcFd ntcAddr ntcVersion ntcVersionData resolver resolverError m

interfaces

-> Tracers ntnAddr ntnVersion ntcAddr ntcVersion m

tracers

-> TracersExtra ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData resolverError m

p2p tracers

-> Arguments m ntnFd ntnAddr ntcFd ntcAddr

configuration

-> ArgumentsExtra m

p2p configuration

-> Applications ntnAddr ntnVersion ntnVersionData ntcAddr ntcVersion ntcVersionData m a

protocol handlers

-> ApplicationsExtra ntnAddr m a

p2p protocol handlers

-> m Void 

type NodeToNodePeerConnectionHandle (mode :: Mode) ntnAddr ntnVersionData (m :: Type -> Type) a b = PeerConnectionHandle mode (ResponderContext ntnAddr) ntnAddr ntnVersionData ByteString m a b Source #

Re-exports