Kagome
Polkadot Runtime Engine in C++17
router.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_ROUTER_HPP
7 #define KAGOME_ROUTER_HPP
8 
9 #include <libp2p/connection/stream.hpp>
10 #include <libp2p/protocol/ping.hpp>
11 
19 
20 namespace kagome::network {
25  class Router {
26  public:
27  virtual ~Router() = default;
28 
29  virtual std::shared_ptr<BlockAnnounceProtocol> getBlockAnnounceProtocol()
30  const = 0;
31  virtual std::shared_ptr<CollationProtocol> getCollationProtocol() const = 0;
32  virtual std::shared_ptr<ReqCollationProtocol> getReqCollationProtocol()
33  const = 0;
34  virtual std::shared_ptr<PropagateTransactionsProtocol>
36  virtual std::shared_ptr<StateProtocol> getStateProtocol() const = 0;
37  virtual std::shared_ptr<SyncProtocol> getSyncProtocol() const = 0;
38  virtual std::shared_ptr<GrandpaProtocol> getGrandpaProtocol() const = 0;
39 
40  virtual std::shared_ptr<libp2p::protocol::Ping> getPingProtocol() const = 0;
41  };
42 } // namespace kagome::network
43 
44 #endif // KAGOME_ROUTER_HPP
virtual std::shared_ptr< libp2p::protocol::Ping > getPingProtocol() const =0
virtual std::shared_ptr< StateProtocol > getStateProtocol() const =0
virtual std::shared_ptr< ReqCollationProtocol > getReqCollationProtocol() const =0
virtual std::shared_ptr< PropagateTransactionsProtocol > getPropagateTransactionsProtocol() const =0
virtual std::shared_ptr< BlockAnnounceProtocol > getBlockAnnounceProtocol() const =0
virtual std::shared_ptr< SyncProtocol > getSyncProtocol() const =0
virtual std::shared_ptr< GrandpaProtocol > getGrandpaProtocol() const =0
virtual std::shared_ptr< CollationProtocol > getCollationProtocol() const =0
virtual ~Router()=default