darkfi::rpc

Module server

Source
Expand description

Server-side JSON-RPC implementation

Traitsยง

  • Asynchronous trait implementing a handler for incoming JSON-RPC requests.

Functionsยง

  • Accept function that should run inside a loop for accepting incoming JSON-RPC requests and passing them to the RequestHandler.
  • handle_request ๐Ÿ”’
    Auxiliary function to handle a request in the background.
  • Start a JSON-RPC server bound to the givven accept URL and use the given RequestHandler to handle incoming requests.
  • run_accept_loop ๐Ÿ”’
    Wrapper function around accept() to take the incoming connection and pass it forward.