Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpcdaemon: extract JSON-RPC handler out of transport #1962

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented Apr 10, 2024

This PR performs some refactoring to remove any dependency from http and ws modules to json_rpc module to avoid transport-level being dependent on presentation-level, which is kind of an anti-pattern. Namely, a new transport module is introduced which defines the rpc::RequestHandler interface and will contain both http and ws modules in the future.

This PR is the first one in a row.

Extras

  • improve readability in http::Server run loop
  • move StreamWriter from common to transport
  • improve naming in ws::Connection
  • demote some log traces

@canepat canepat added the maintenance Some maintenance work (fix, refactor, rename, test...) label Apr 10, 2024
@canepat canepat requested a review from lupin012 April 10, 2024 22:28
@canepat canepat changed the title Rpcdaemon refactor request handler rpcdaemon: extract JSON-RPC handler out of transport Apr 10, 2024
move socket option set into Connection
@canepat canepat merged commit d0a47d3 into master Apr 11, 2024
4 checks passed
@canepat canepat deleted the rpcdaemon_refactor_request_handler branch April 11, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Some maintenance work (fix, refactor, rename, test...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants