ouroboros-network-framework-0.13.1.0: Ouroboros network framework
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.Protocol.Handshake.Type

Synopsis

Handshake Protocol

data Handshake vNumber vParams where Source #

The handshake mini-protocol is used initially to agree the version and associated parameters of the protocol to use for all subsequent communication.

Constructors

StProposeHandshake vNumber vParams 
StConfirmHandshake vNumber vParams 
StDoneHandshake vNumber vParams 

Instances

Instances details
ShowProxy (Handshake vNumber vParams ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

showProxyProxy (Handshake vNumber vParams) → String Source #

Show (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

NFData (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfClientHasAgency st → () #

NFData (NobodyHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfNobodyHasAgency st → () #

NFData (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfServerHasAgency st → () #

(Show vNumber, Show vParams) ⇒ Show (Message (Handshake vNumber vParams) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

showsPrecIntMessage (Handshake vNumber vParams) from to → ShowS #

showMessage (Handshake vNumber vParams) from to → String #

showList ∷ [Message (Handshake vNumber vParams) from to] → ShowS #

(NFData vNumber, NFData vParams) ⇒ NFData (Message (Handshake vNumber vParams) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfMessage (Handshake vNumber vParams) from to → () #

NFData (PeerHasAgency pr st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfPeerHasAgency pr st → () #

Protocol (Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Associated Types

data Message (Handshake vNumber vParams) st st' Source #

data ClientHasAgency st Source #

data ServerHasAgency st Source #

data NobodyHasAgency st Source #

data ClientHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data ClientHasAgency (st ∷ Handshake vNumber vParams) where
data Message (Handshake vNumber vParams) (from ∷ Handshake vNumber vParams) (to ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data Message (Handshake vNumber vParams) (from ∷ Handshake vNumber vParams) (to ∷ Handshake vNumber vParams) where
data NobodyHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data NobodyHasAgency (st ∷ Handshake vNumber vParams) where
data ServerHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data ServerHasAgency (st ∷ Handshake vNumber vParams) where

data family Message ps (st ∷ ps) (st' ∷ ps) Source #

The messages for this protocol. It is expected to be a GADT that is indexed by the from and to protocol states. That is the protocol state the message transitions from, and the protocol state it transitions into. These are the edges of the protocol state transition system.

Instances

Instances details
(Show vNumber, Show vParams) ⇒ Show (Message (Handshake vNumber vParams) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

showsPrecIntMessage (Handshake vNumber vParams) from to → ShowS #

showMessage (Handshake vNumber vParams) from to → String #

showList ∷ [Message (Handshake vNumber vParams) from to] → ShowS #

(NFData vNumber, NFData vParams) ⇒ NFData (Message (Handshake vNumber vParams) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfMessage (Handshake vNumber vParams) from to → () #

data Message (Handshake vNumber vParams) (from ∷ Handshake vNumber vParams) (to ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data Message (Handshake vNumber vParams) (from ∷ Handshake vNumber vParams) (to ∷ Handshake vNumber vParams) where

data family ClientHasAgency (st ∷ ps) Source #

Tokens for those protocol states in which the client has agency.

Instances

Instances details
Show (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

NFData (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfClientHasAgency st → () #

data ClientHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data ClientHasAgency (st ∷ Handshake vNumber vParams) where

data family ServerHasAgency (st ∷ ps) Source #

Tokens for those protocol states in which the server has agency.

Instances

Instances details
Show (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

NFData (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfServerHasAgency st → () #

data ServerHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data ServerHasAgency (st ∷ Handshake vNumber vParams) where

data family NobodyHasAgency (st ∷ ps) Source #

Tokens for terminal protocol states in which neither the client nor server has agency.

Instances

Instances details
NFData (NobodyHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfNobodyHasAgency st → () #

data NobodyHasAgency (st ∷ Handshake vNumber vParams) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data NobodyHasAgency (st ∷ Handshake vNumber vParams) where

On simultaneous open both sides will send MsgProposeVersions, which will be decoded as MsgReplyVersions. It is a terminal message of the protocol. It is important to stress that in this case both sides will make the choice which version and parameters to pick. Our algorithm for picking version is symmetric, which ensures that both sides will end up with the same choice. If one side decides to refuse the version it will close the connection, without sending the reason to the other side.

data RefuseReason vNumber Source #

Reasons by which a server can refuse proposed version.

Constructors

VersionMismatch [vNumber] [Int]

All of the prosed versions where not known to the server. Since the server sends all versions that it can knows about, some of them we might not be able to decode, so we include raw tags [Int].

HandshakeDecodeError vNumber Text

The server failed to decode version parameters.

Refused vNumber Text

The server refused to run the proposed version parameters

Instances

Instances details
(Typeable vNumber, Show vNumber) ⇒ Exception (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Generic (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Associated Types

type Rep (RefuseReason vNumber) ∷ TypeType #

Methods

fromRefuseReason vNumber → Rep (RefuseReason vNumber) x #

toRep (RefuseReason vNumber) x → RefuseReason vNumber #

Show vNumber ⇒ Show (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

showsPrecIntRefuseReason vNumber → ShowS #

showRefuseReason vNumber → String #

showList ∷ [RefuseReason vNumber] → ShowS #

NFData vNumber ⇒ NFData (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

rnfRefuseReason vNumber → () #

Eq vNumber ⇒ Eq (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

(==)RefuseReason vNumber → RefuseReason vNumber → Bool #

(/=)RefuseReason vNumber → RefuseReason vNumber → Bool #

type Rep (RefuseReason vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

data HandshakeProtocolError vNumber Source #

Extends handshake error RefuseReason type, by client specific errors.

Instances

Instances details
(Typeable vNumber, Show vNumber) ⇒ Exception (HandshakeProtocolError vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Show vNumber ⇒ Show (HandshakeProtocolError vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Eq vNumber ⇒ Eq (HandshakeProtocolError vNumber) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

Methods

(==)HandshakeProtocolError vNumber → HandshakeProtocolError vNumber → Bool #

(/=)HandshakeProtocolError vNumber → HandshakeProtocolError vNumber → Bool #

data HandshakeResult r vNumber vData Source #

The result of a handshake.

Constructors

HandshakeNegotiationResult r vNumber vData 
HandshakeQueryResult (Map vNumber (Either Text vData))