Coder Social home page Coder Social logo

Comments (4)

darcys22 avatar darcys22 commented on September 25, 2024

So t_command_parser_executor::print_sn_status is in the daemonize namespace. To call this from core_rpc_server I think will result in a circular reference.

Also the current print_sn simply writes to cout so will likely need to be modified to return something that can be passed in the rpc response.

where would the best place be to move the print_sn_status call so that both the daemon and the rpc can call it? or can this be done in the daemonize namespace anyway?

from oxen-core.

Doy-lee avatar Doy-lee commented on September 25, 2024

This issue is actually for adding a JSON RPC endpoint for print_sn_status. In which case most of the infrastructure is already there don't need to re-write too much.

Just need to add the endpoint in core_rpc_server.h and map the "get_service_node_status" string to a new core_rpc_server function, on_get_service_node_status. Create the request and response structure in core_rpc_server_command_defs.h

Then you'd move the work of generating the response to the RPC request in core_rpc_server::on_get_service_node_status, followed by updating t_rpc_command_executor to call into core_rpc_server to DRY the logic.

Now ideally we actually want to move to deprecating get_service_nodes* and its children and switch to get_n_service_nodes as it's better designed. But one step at a time.

from oxen-core.

javabudd avatar javabudd commented on September 25, 2024

can this be closed?

from oxen-core.

darcys22 avatar darcys22 commented on September 25, 2024

Yeah this was merged

from oxen-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.