1. Aug 04, 2022
  2. Jul 29, 2022
  3. Jul 20, 2022
  4. Jul 06, 2022
    • Niklas Adolfsson's avatar
      fix clippy (#817) · a26f1fb7
      Niklas Adolfsson authored
      a26f1fb7
    • Niklas Adolfsson's avatar
      middleware refactoring (#793) · 3ee635ff
      Niklas Adolfsson authored
      * WIP: refactoring
      
      * refactor http server
      
      * fix tests
      
      * Delete TODO.txt
      
      * fix tests again
      
      * add benches/src/lib.rs
      
      * remove bench changes; fast less deps
      
      * no more env_logger
      
      * update examples
      
      * ws server; expose headers in middleware
      
      * add back uncommented code
      
      * fix nits
      
      * make the code more readable
      
      * add back the tracing stuff
      
      * simplify code but one extra clone
      
      * fix tests again
      
      * revert async accept API
      
      * fix nits
      
      * different traits for WS and HTTP middleware
      
      * fix tests
      
      * revert benchmark change
      
      * Update core/src/server/helpers.rs
      
      * Update ws-server/Cargo.toml
      
      * add limit to batch responses as well
      
      * pre-allocate string for batches
      
      * small refactor
      3ee635ff
  5. Jun 22, 2022
  6. Jun 21, 2022
    • Niklas Adolfsson's avatar
      feat(logging): add `tracing span` per JSON-RPC call (#722) · 00c2ce65
      Niklas Adolfsson authored
      * less verbose logging + tracing based on method name
      
      * add tracing per rpc call
      
      * fix nits
      
      * remove unsed feature
      
      * fix build
      
      * http make logging more human friendly
      
      * unify logging format
      
      * deps: make tracing hard dependency
      
      * fix tests
      
      * fix nit
      
      * fix build
      
      * fix nits
      
      * Update core/src/client/async_client/mod.rs
      
      * Update core/Cargo.toml
      
      * Update core/src/lib.rs
      00c2ce65
  7. Jun 13, 2022
  8. Jun 01, 2022
  9. May 25, 2022
  10. May 11, 2022
  11. May 04, 2022
  12. May 03, 2022
  13. Apr 20, 2022
  14. Apr 01, 2022
    • Niklas Adolfsson's avatar
      feat(http server): add new builder APIs `build_from_tcp` and `build_from_hyper` (#719) · 34c2fbef
      Niklas Adolfsson authored
      * unify servers; use tokio::TcpListener
      
      * add API to build server from tcp socket
      
      * build_from_tcp nit: not async
      
      * fix nits
      
      * change `build_from_tcp` force users configure hyper
      
      The hyper settings might contradict to settings on the provided
      socket, force users of this API to configure that avoid confusion and
      unexpected settings.
      
      * Update http-server/src/server.rs
      
      * fix doc links
      
      * add separate APIs `build_from_tcp` and `build_from_hyper`
      
      * fix clippy
      
      * remove dead code
      
      * fix build
      
      * fix nit in example code
      34c2fbef
  15. Mar 28, 2022
  16. Mar 22, 2022
  17. Jan 21, 2022
    • Niklas Adolfsson's avatar
      feat(rpc module): `stream API` for SubscriptionSink (#639) · 9bd21274
      Niklas Adolfsson authored
      
      
      * feat(rpc module): add_stream to subscription sink
      
      * fix some nits
      
      * unify parameters to rpc methods
      
      * Update core/src/server/rpc_module.rs
      
      * Update tests/tests/integration_tests.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * address grumbles
      
      * fix subscription tests
      
      * new type for `SubscriptionCallback` and glue code
      
      * remove unsed code
      
      * remove todo
      
      * add missing feature tokio/macros
      
      * make `add_stream` cancel-safe
      
      * rename add_stream and return status
      
      * fix nits
      
      * rename stream API -> streamify
      
      * Update core/src/server/rpc_module.rs
      
      * provide proper close reason
      
      * spelling
      
      * consume_and_streamify + docs
      
      * fmt
      
      * rename API pipe_from_stream
      
      * improve logging; indicate which subscription method that failed
      
      Co-authored-by: default avatarDavid <[email protected]>
      9bd21274
  18. Jan 05, 2022
    • Niklas Adolfsson's avatar
      fix(http server): handle post and option HTTP requests properly. (#637) · 6f99a038
      Niklas Adolfsson authored
      
      
      * fix(http server): handle post and option requests.
      
      * Update http-server/src/response.rs
      
      * fmt
      
      * grumbles: validate CORS before checking method kind
      
      * revert unintentional change
      
      * Add A few tests around CORS and http method/header acceptance
      
      * Tweak the CORS test
      
      * return appropriate headers for CORS preflight response
      
      * cargo fmt
      
      * jsonrpc, not jsonrpsee in test requests
      
      * don't test OPTIONS method in unsupported_methods test as it has different expectations
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Add an example to test CORS in browser, and a couple of fixes to CORS handling
      
      * cargo fmt
      
      * Update examples/cors_server.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      6f99a038
  19. Dec 21, 2021
    • Niklas Adolfsson's avatar
      feat: server configurable subscriptionID (#604) · bc688cc2
      Niklas Adolfsson authored
      
      
      * PoC
      
      * introduce IdProvider trait
      
      * revert Cow stuff
      
      * Update ws-server/src/server.rs
      
      * fix tests
      
      * cargo fmt
      
      * use 'static lifetime in SubscriptionId
      
      * fix tests
      
      * fmt
      
      * make tests compile again
      
      * fix tests
      
      * Fix tests
      
      * Move IdProvider impls to own module
      
      * move `sub-id gen` types to `core`
      
      * fix doc links
      
      * make rand non-optional dep
      
      * feature gate: id provider
      
      Co-authored-by: default avatarDavid Palm <[email protected]>
      bc688cc2
  20. Dec 20, 2021
    • Niklas Adolfsson's avatar
      extract async client abstraction. (#580) · 292bd88a
      Niklas Adolfsson authored
      
      
      * extract ws client to async client
      
      * bring back jsonrpsee-ws-client crate
      
      * new crate core client
      
      * add missing file
      
      * jsonrpsee crate: add core client
      
      * rexport core client
      
      * more re-exports
      
      * downgrade trait bounds
      
      * update version
      
      * fix nits
      
      * send close reason
      
      * Update types/src/traits.rs
      
      * move 'TEN_MB_CONST' to core
      
      * Update client/core-client/Cargo.toml
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/core-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * cargo fmt
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * move `async-client` core
      
      The `async-client` is hidden behind a new feature flag `async-client`
      because it brings in additional dependecies such as tokio rt.
      
      * fix docs
      
      * add example how to use "core client"
      
      * fix build
      
      * Update http-server/Cargo.toml
      
      * Update client/transport/Cargo.toml
      
      Co-authored-by: default avatarDavid <[email protected]>
      292bd88a
  21. Dec 17, 2021
    • Maciej Hirsz's avatar
      Crate restructuring (#590) · e159c449
      Maciej Hirsz authored
      
      
      * Nuke V2
      
      * fmt
      
      * Formatting and imports
      
      * Updated benches
      
      * Fix doc comment link
      
      * Brace imports in ws-server
      
      * Reworking imports
      
      * std first
      
      * fmt
      
      * std on top
      
      * Update to match changed line numbers
      
      * Rename jsonrpsee_utils -> jsonrpsee_core
      
      * Migrating things types -> core
      
      * RpcError -> ErrorResponse
      
      * Merge types::client into core::client
      
      * Continued move types -> core
      
      * Removing features to make checks pass
      
      * Move rpc_module tests to tests crate
      
      * Fixed doc comment links
      
      * Add futures-util dependency for client
      
      * Remove dead code
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * fmt
      
      * Feature gate the Client trait
      
      * Move `Client` traits to `client` module
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      e159c449
  22. Dec 06, 2021
  23. Dec 01, 2021
    • Maciej Hirsz's avatar
      Middleware for metrics (#576) · 1657e26b
      Maciej Hirsz authored
      
      
      * Squashed MethodSink
      
      * Middleware WIP
      
      * Passing all the information through
      
      * Unnecessary `false`
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Add a setter for middleware (#577)
      
      * Fix try-build tests
      
      * Add a middleware setter and an example
      
      * Actually add the example
      
      * Grumbles
      
      * Use an atomic
      
      * Set middleware with a constructor instead
      
      * Resolve a todo
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Middleware::on_response for batches
      
      * Middleware in HTTP
      
      * fmt
      
      * Server builder for HTTP
      
      * Use actual time in the example
      
      * HTTP example
      
      * Middleware to capture method not found calls
      
      * An example of adding multiple middlewares. (#581)
      
      * Add an example of adding multiple middlewares.
      
      * Update examples/multi-middleware.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Update examples/Cargo.toml
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Move `Middleware` to jsonrpsee-types (#582)
      
      * Move `Middleware` to jsonrpsee-types
      
      * Move Middleware trait to jsonrpsee-types
      
      * Add some docs.
      
      * Link middleware to `with_middleware` methods in docs
      
      * Doctests
      
      * Doc comment fixed
      
      * Clean up a TODO
      
      * Switch back to `set_middleware`
      
      * fmt
      
      * Tests
      
      * Add `on_connect` and `on_disconnect`
      
      * Add note to future selves
      
      Co-authored-by: default avatarDavid <[email protected]>
      1657e26b
  24. Nov 17, 2021
  25. Nov 11, 2021
  26. Nov 10, 2021
  27. Nov 08, 2021
  28. Oct 15, 2021
  29. Oct 12, 2021
  30. Oct 11, 2021
    • Niklas Adolfsson's avatar
      [http server]: use tokio::spawn internally in `HttpServer::start` and return `StopHandle` (#402) · 6fb61dc1
      Niklas Adolfsson authored
      
      
      * [ws server]: refactor start()
      
      * remove needless clone
      
      * fix http server too
      
      * fmt
      
      * unify stop APIs
      
      * fix bad merge
      
      * add API to use custom tokio runtime
      
      * use futures oneshot
      
      * fix unintentional change
      
      * Revert "use futures oneshot"
      
      This reverts commit 0432f6ba41d49a3494943458657a31f8afd79160.
      
      * Update http-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      6fb61dc1
    • Niklas Adolfsson's avatar
      [http server]: use similar API for host and origin filtering as `WS` (#473) · 7a9ebc91
      Niklas Adolfsson authored
      
      
      * use similar API for HTTP ACL builder
      
      * revert unintentional change
      
      * fix nits
      
      * Update http-server/src/access_control/mod.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * grumbles
      
      Co-authored-by: default avatarDavid <[email protected]>
      7a9ebc91
    • Maciej Hirsz's avatar
      Resource Limiting (#500) · 518a6155
      Maciej Hirsz authored
      
      
      * Squash post merge
      
      * RAII claims and some comments
      
      * Adding resources to Methods
      
      * Use arrays for claiming all resources at once
      
      * Register resources on ws-server
      
      * Return MethodResourcesBuilder from register_method
      
      * Return MethodResourcesBuilder from register_async_method
      
      * fmt and comments
      
      * Add `verify_and_insert` to get rid of `or_insert` in order to get mut ref to value
      
      * Resources initialization
      
      * No need for ResourceBuilder
      
      * Comment all the things
      
      * Handle errors on ws-server `start` method
      
      * Passing ResourceGuard to method execution
      
      * Start ws-server in background, simplify all the tests!
      
      * Claiming resources on runtime
      
      * Do checked math on resource claiming
      
      * Clearer error path for resources at limit
      
      * Resource limiting tests WIP
      
      * Unbox async futures
      
      * fmt
      
      * Cleaner proc macro
      
      * Fix lifetime issues with ResourceGuard with internal Arc
      
      * Remove unnecessary lifetime generic
      
      * Working tests
      
      * Use turbofish in tests
      
      * fmt
      
      * Fixed (?) benches
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Tweak more grumbles
      
      * Adding a test for resource limiting with proc macros (WIP)
      
      * Reworking attribute macros for resource limiting (#507)
      
      * Squashed macros WIP
      
      * bae-less macros!
      
      * Make things simpler and more readable
      
      * Some comments and DRY aliases parsing
      
      * Naming things is hard
      
      * Respan is no longer needed
      
      * Simpler Arguments
      
      * Remove stale code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * syn-up all the things, handle resources on methods
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Resource limiting on the http server
      
      * Test two resources at once
      
      * Test the HTTP server for resource limiting
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Comment tweaks
      
      * More explicit error type for `AttributeMeta::retain`
      
      * Remove generic from ResourceTable; derive Default on ws Builder
      
      * Make the macros shorter
      
      Co-authored-by: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      518a6155
  31. Oct 05, 2021
    • Niklas Adolfsson's avatar
      ws client redirections (#397) · 94c881b8
      Niklas Adolfsson authored
      
      
      * feat(ws client): support redirections
      
      * reuse socket
      
      * reuse socket
      
      * add hacks
      
      * fix build
      
      * remove hacks
      
      * fix bad merge
      
      * address grumbles
      
      * fix grumbles
      
      * fix grumbles
      
      * fix nit
      
      * add redirection test
      
      * Update test-utils/src/types.rs
      
      * Resolved todo
      
      * Check that redirected client actually works
      
      * Rename test-utils "types" to "mocks"
      
      * Fix windows test (?)
      
      * fmt
      
      * What is wrong with you windows?
      
      * Ignore redirect test on windows
      
      * fix bad transport errors
      
      * debug windows tests
      
      * update soketto
      
      * maybe fix windows test
      
      * add config flag for max redirections
      
      * revert faulty change.
      
      Relative reference must start with either `/` or `//`
      
      * revert windows path
      
      * use manual join paths
      
      * remove url dep
      
      * Update ws-client/src/tests.rs
      
      * default max redirects 5
      
      * remove needless clone vec
      
      * fix bad merge
      
      * cmon CI run
      
      Co-authored-by: default avatarDavid Palm <[email protected]>
      94c881b8
  32. Oct 01, 2021
  33. Sep 16, 2021
  34. Sep 15, 2021
    • David's avatar
      Rename and reorg types (#462) · 635142e3
      David authored
      * Renames
      
      * More renames
      
      * fmt
      
      * s/RpcParams/Params/
      
      * Add a type alias `SubscriptionResponse` to `Notification` which is parametrized to `SubscriptionPayload`
      Move `SubscriptionResponse` to the `response` module
      
      * Fix doc links
      
      * Cleanup and some docs
      
      * Review feedback
      
      * cleanup
      635142e3
    • Niklas Adolfsson's avatar
      [http server]: export acl types + remove cors_max_age (#466) · be96c56d
      Niklas Adolfsson authored
      * [http server]: export acl + kill cors_max_age
      
      * fix cors_max_age nit
      
      * fmt
      
      * remove max_cors_age
      be96c56d