Loading src/scord-ctl/rpc_handlers.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <logger/logger.hpp> #include <net/request.hpp> #include <net/client.hpp> #include "rpc_handlers.hpp" struct remote_procedure { Loading Loading @@ -59,4 +60,27 @@ ping(const scord::network::request& req) { req.respond(resp); } void deploy_adhoc_storage(const scord::network::request& req) { using scord::network::generic_response; using scord::network::get_address; const auto rpc_id = remote_procedure::new_id(); LOGGER_INFO("rpc id: {} name: {} from: {} => " "body: {{}}", rpc_id, std::quoted(__FUNCTION__), std::quoted(get_address(req))); const auto resp = generic_response{rpc_id, scord::error_code::success}; LOGGER_INFO("rpc id: {} name: {} to: {} <= " "body: {{retval: {}}}", rpc_id, std::quoted(__FUNCTION__), std::quoted(get_address(req)), scord::error_code::success); req.respond(resp); } } // namespace scord_ctl::network::handlers src/scord-ctl/rpc_handlers.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ namespace scord_ctl::network::handlers { void ping(const scord::network::request& req); void deploy_adhoc_storage(const scord::network::request& req); } // namespace scord_ctl::network::handlers #endif // SCORD_CTL_RPC_HANDLERS_HPP Loading
src/scord-ctl/rpc_handlers.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <logger/logger.hpp> #include <net/request.hpp> #include <net/client.hpp> #include "rpc_handlers.hpp" struct remote_procedure { Loading Loading @@ -59,4 +60,27 @@ ping(const scord::network::request& req) { req.respond(resp); } void deploy_adhoc_storage(const scord::network::request& req) { using scord::network::generic_response; using scord::network::get_address; const auto rpc_id = remote_procedure::new_id(); LOGGER_INFO("rpc id: {} name: {} from: {} => " "body: {{}}", rpc_id, std::quoted(__FUNCTION__), std::quoted(get_address(req))); const auto resp = generic_response{rpc_id, scord::error_code::success}; LOGGER_INFO("rpc id: {} name: {} to: {} <= " "body: {{retval: {}}}", rpc_id, std::quoted(__FUNCTION__), std::quoted(get_address(req)), scord::error_code::success); req.respond(resp); } } // namespace scord_ctl::network::handlers
src/scord-ctl/rpc_handlers.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ namespace scord_ctl::network::handlers { void ping(const scord::network::request& req); void deploy_adhoc_storage(const scord::network::request& req); } // namespace scord_ctl::network::handlers #endif // SCORD_CTL_RPC_HANDLERS_HPP