6 #ifndef IROHA_NETWORK_IMPL_HPP 7 #define IROHA_NETWORK_IMPL_HPP 10 #include "yac.grpc.pb.h" 14 #include <unordered_map> 36 std::function<std::unique_ptr<proto::Yac::StubInterface>(
41 std::shared_ptr<YacNetworkNotifications> handler)
override;
44 const std::vector<VoteMessage> &state)
override;
52 ::grpc::ServerContext *context,
53 const ::iroha::consensus::yac::proto::State *request,
54 ::google::protobuf::Empty *response)
override;
70 std::unique_ptr<proto::Yac::StubInterface>>
76 std::weak_ptr<YacNetworkNotifications> handler_;
81 std::shared_ptr<network::AsyncGrpcClient<google::protobuf::Empty>>
87 std::function<std::unique_ptr<proto::Yac::StubInterface>(
91 std::mutex stop_mutex_;
92 bool stop_requested_{
false};
101 #endif // IROHA_NETWORK_IMPL_HPP Definition: yac_network_interface.hpp:35
std::string AddressType
Type of peer address.
Definition: types.hpp:50
void stop() override
Prevent any new outgoing network activity. Be passive.
Definition: network_impl.cpp:38
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:15
Definition: network_impl.hpp:31
void sendState(const shared_model::interface::Peer &to, const std::vector< VoteMessage > &state) override
Definition: network_impl.cpp:43
void subscribe(std::shared_ptr< YacNetworkNotifications > handler) override
Definition: network_impl.cpp:33
NetworkImpl(std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >> async_call, std::function< std::unique_ptr< proto::Yac::StubInterface >(const shared_model::interface::Peer &)> client_creator, logger::LoggerPtr log)
Definition: network_impl.cpp:23
Definition: async_grpc_client.hpp:25
Status
Definition: status.hpp:12
grpc::Status SendState(::grpc::ServerContext *context, const ::iroha::consensus::yac::proto::State *request, ::google::protobuf::Empty *response) override
Definition: network_impl.cpp:67