6 #ifndef KAGOME_NETWORK_REQCOLLATIONPROTOCOL 7 #define KAGOME_NETWORK_REQCOLLATIONPROTOCOL 13 #include <libp2p/connection/stream.hpp> 14 #include <libp2p/host/host.hpp> 29 struct ReqCollationProtocolImpl;
41 std::shared_ptr<ReqCollationObserver> observer);
45 bool start()
override;
51 std::function<
void(outcome::result<std::shared_ptr<Stream>>)> &&cb)
56 std::function<
void(outcome::result<CollationFetchingResponse>)>
57 &&response_handler)
override;
60 std::shared_ptr<ReqCollationProtocolImpl>
impl_;
65 #endif // KAGOME_NETWORK_REQCOLLATIONPROTOCOL
std::shared_ptr< ReqCollationProtocolImpl > impl_
void request(const PeerId &peer_id, CollationFetchingRequest request, std::function< void(outcome::result< CollationFetchingResponse >)> &&response_handler) override
ReqCollationProtocol()=delete
void onIncomingStream(std::shared_ptr< Stream > stream) override
~ReqCollationProtocol() override=default
libp2p::peer::PeerInfo PeerInfo
libp2p::peer::Protocol Protocol
libp2p::peer::PeerId PeerId
void newOutgoingStream(const PeerInfo &peer_info, std::function< void(outcome::result< std::shared_ptr< Stream >>)> &&cb) override
const Protocol & protocolName() const override