1. 03 Aug, 2022 1 commit
  2. 06 Jul, 2022 2 commits
    • 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
  3. 29 Jun, 2022 1 commit
  4. 14 Jun, 2022 1 commit
  5. 13 Jun, 2022 1 commit
  6. 19 May, 2022 1 commit
  7. 03 May, 2022 1 commit
  8. 29 Apr, 2022 1 commit
    • Niklas Adolfsson's avatar
      fix(rpc module): close subscription task when a subscription is `unsubscribed`... · 8e945de4
      Niklas Adolfsson authored
      fix(rpc module): close subscription task when a subscription is `unsubscribed` via the `unsubscribe call` (#743)
      
      * refactor: remove SubscriptionSink::inner_send
      
      * fix: close running task if unsubscribed
      
      * Update core/src/server/rpc_module.rs
      
      * Update core/src/server/rpc_module.rs
      
      * fix nits
      
      * Update core/src/server/rpc_module.rs
      
      * add test for canceling subscriptions
      
      * print subscription info; once per minute
      
      * revert closure stuff
      
      * Revert "print subscription info; once per minute"
      
      This reverts commit 366176a8
      
      .
      
      * use tokio::sync::watch instead of oneshot
      
      The receiver is clonable and it's possible to check whether the sender is still alive
      
      * Update tests/tests/helpers.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * grumbles: use unwrap in tests
      
      * add test for reuse pipe_from_stream
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      8e945de4
  9. 20 Apr, 2022 1 commit
    • Niklas Adolfsson's avatar
      fix(rpc module): fail subscription calls with bad params (#728) · 9fa817d9
      Niklas Adolfsson authored
      
      
      * fix(rpc module): fail subscription with bad params
      
      * draft; show my point
      
      * fix tests
      
      * fix build
      
      * add tests for proc macros too
      
      * add tests for bad params in proc macros
      
      * fix nits
      
      * commit all files
      
      * add ugly fix for proc macro code
      
      * add more user friendly API
      
      * make SubscriptionSink::close take mut self
      
      * fix grumbles
      
      * show james some code
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * remove needless clone
      
      * fix build
      
      * client fix docs + error type
      
      * simplify code: merge connect reset and unsubscribe close reason
      
      * remove unknown close reason
      
      * refactor: remove Error::SubscriptionClosed
      
      * add some nice APIs to ErrorObjectOwned
      
      * unify api
      
      * address grumbles
      
      * remove redundant methods for close and reject
      
      * proc macro: compile err when subscription -> Result
      
      * rpc module: fix test subscription test
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Update proc-macros/src/lib.rs
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * address grumbles
      
      * remove faulty comment
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * fix: don't send `RPC Call failed: error`.
      
      * remove debug assert
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      9fa817d9
  10. 05 Apr, 2022 1 commit
  11. 01 Apr, 2022 1 commit
  12. 30 Mar, 2022 1 commit
  13. 09 Mar, 2022 1 commit
  14. 22 Feb, 2022 1 commit
  15. 21 Jan, 2022 2 commits
  16. 21 Dec, 2021 1 commit
    • 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: David's avatarDavid Palm <dvdplm@gmail.com>
      bc688cc2
  17. 17 Dec, 2021 1 commit
    • 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: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      
      * fmt
      
      * Feature gate the Client trait
      
      * Move `Client` traits to `client` module
      
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      e159c449
  18. 15 Dec, 2021 1 commit
    • Niklas Adolfsson's avatar
      refactor `SubscriptionClosed` (#612) · c480d90a
      Niklas Adolfsson authored
      
      
      * refactor `SubscriptionClosed`
      
      I noticed that we "trying" to sending "close messages" on subscriptions
      that already has been terminated by the client which is unnecessary.
      
      Moreover, this introduces `fn is_closed` to check whether a given
      channel is closed without having to send an actual message on the channel.
      
      * cargo fmt
      
      * Update types/src/error.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * fix nits
      
      * more grumbles
      
      * make rust stable happy
      
      * SubscriptionClosed: add deny unknown fields
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      c480d90a
  19. 10 Dec, 2021 2 commits
  20. 06 Dec, 2021 1 commit
  21. 01 Dec, 2021 1 commit
  22. 30 Nov, 2021 1 commit
  23. 23 Nov, 2021 1 commit
  24. 19 Nov, 2021 1 commit
  25. 18 Nov, 2021 2 commits
  26. 11 Nov, 2021 1 commit
  27. 17 Oct, 2021 1 commit
    • Niklas Adolfsson's avatar
      benches: add option to run benchmarks against jsonrpc crate servers (#527) · 0b435556
      Niklas Adolfsson authored
      * fix http client bench with request limit
      
      * benches for jsonrpc servers
      
      * workaround; dont use max request limit
      
      * add subscriptions
      
      * revert unintentional change
      
      * ignore batch request bench for ws
      
      * fmt
      
      * log -> tracing
      
      * test bench CI
      
      * test bench v0.3
      
      * wtf; run CI
      
      * work plz
      
      * remove test CI bench
      
      * fix compile warn on macos
      0b435556
  28. 15 Oct, 2021 2 commits
    • Niklas Adolfsson's avatar
      switch to the tracing crate (#525) · 37474f45
      Niklas Adolfsson authored
      37474f45
    • Maciej Hirsz's avatar
      `register_blocking_method` (#523) · 50b172e2
      Maciej Hirsz authored
      * register_blocking_method
      
      * Support `blocking` flag in `#[method]`
      
      * Macro support and tests
      
      * MacOS CI fails if there are too many blocking tasks
      
      * conn_id is never used in async callbacks
      
      * Dry-run blocking callbacks to maybe satisfy MacOS CI
      
      * Make tokio optional behind server feature flag
      
      * Document `blocking` flag use in `#[method]`
      
      * Comment why the test is disabled on mac
      
      * Fix warnings on macos tests
      50b172e2
  29. 13 Oct, 2021 1 commit
  30. 12 Oct, 2021 1 commit
  31. 11 Oct, 2021 2 commits
    • Niklas Adolfsson's avatar
      improve SubscriptionClosed error (#504) · 36bdb85e
      Niklas Adolfsson authored
      Closing #485
      36bdb85e
    • 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: David's avatarDavid <dvdplm@gmail.com>
      
      * 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: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      
      * syn-up all the things, handle resources on methods
      
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      
      * 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: David's avatarDavid <dvdplm@gmail.com>
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      
      * 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: David's avatarDavid <dvdplm@gmail.com>
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      518a6155
  32. 01 Oct, 2021 1 commit
  33. 29 Sep, 2021 1 commit
  34. 24 Sep, 2021 1 commit
    • Niklas Adolfsson's avatar
      fix: ws server terminate subscriptions when connection is closed by the client. (#483) · 7cd7f36a
      Niklas Adolfsson authored
      * fix: server should not send to closed subscription
      
      Closing #481
      
      * add a test
      
      * rewrite me
      
      * remove faulty server close
      
      * fix tests
      
      * fix tests
      
      * remove needless code
      
      * Update ws-client/src/client.rs
      
      * fix: remove atomic flag; use `close_sender`
      
      * remove terminate message; use close channel
      
      * remove faulty subscription closed error msg
      
      * fix tests
      
      * fix grumbles
      
      * fix build
      7cd7f36a