- 16 Aug, 2022 1 commit
-
-
Alexandru Vasile authored
* client: Implement `notify_on_disconnect` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Revert "client: Implement `notify_on_disconnect`" This reverts commit c8ffaa4c . * client: Rely on `tokio::sync::mpsc::Sender` to notify on disconnect Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Implement `InternalError` for tokio and futures_channel's SendError Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Remove tokio-stream dependency Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Rename `notify_on_disconnect` to `on_disconnect` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Add `tokio/sync` as dependency of client feature Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * wasm-client: Use `tokio::sync::mpsc::channel` for notify on disconnect Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Add tokio/sync dependency to satisfy `--no-default-features` check Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Best effort to close channel on client drops Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * revert to: client: Implement `notify_on_disconnect` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Replace tokio/sync with oneshot channel Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Check `client.on_disconnect()` returns when server shuts down Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Fix comment typo Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Call `on_disconnect()` multiple times Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Call `on_disconnect` with closed server Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
-
- 21 Jun, 2022 1 commit
-
-
Niklas Adolfsson authored
* feat(clients): add explicit unsubscribe API * add tests for unsubscribe * rephrase bad english
-
- 20 Apr, 2022 2 commits
-
-
Niklas Adolfsson authored
* feat: untested web-sys transport * rewrite me * make it work * add hacks and works :) * add subscription test too * revert StdError change; still works * cleanup * remove hacks * more wasm tests outside workspace * kill mutually exclusive features * merge nits * remove unsafe hack * fix nit * core: fix features and deps * ci: add WASM test * test again * work work * comeon * work work * revert unintentional change * Update core/Cargo.toml Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
David <dvdplm@gmail.com> * revert needless change: std hashmap + fxhashmap works * cleanup * extract try_connect_until fn * remove todo * fix bad merge * add wasm client wrapper crate * fix nits * use gloo-net dependency * fix build * grumbles CI: rename to `wasm_tests` * fix bad merge * fix grumbles * fix nit * comeon CI Co-authored-by:
David <dvdplm@gmail.com>
-
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 <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 <james@jsdw.me> * Update core/src/server/rpc_module.rs Co-authored-by:
James Wilson <james@jsdw.me> * Update core/src/server/rpc_module.rs Co-authored-by:
James Wilson <james@jsdw.me> * Update core/src/server/rpc_module.rs Co-authored-by:
James Wilson <james@jsdw.me> * Update core/src/server/rpc_module.rs Co-authored-by:
James Wilson <james@jsdw.me> * Update proc-macros/src/lib.rs Co-authored-by:
James Wilson <james@jsdw.me> * address grumbles * remove faulty comment * Update core/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/server/rpc_module.rs Co-authored-by:
David <dvdplm@gmail.com> * fix: don't send `RPC Call failed: error`. * remove debug assert Co-authored-by:
James Wilson <james@jsdw.me> Co-authored-by:
David <dvdplm@gmail.com>
-
- 01 Apr, 2022 1 commit
-
-
Niklas Adolfsson authored
* fix(client): close subscription when server sent `SubscriptionClosed` notification * Update core/src/client/async_client/helpers.rs
-
- 30 Mar, 2022 1 commit
-
-
Niklas Adolfsson authored
* refactor: get rid off `Error::Request` variant * fix nit * to_owned -> to_call_error
-
- 21 Jan, 2022 1 commit
-
-
Niklas Adolfsson authored
* feat(client): support request id as Strings. * add tests for Id::String * address grumbles: move id_kind to RequestManager * Update client/http-client/src/client.rs * types: take ref to `ID` get rid of some `Clone` * remove more clone * grumbles: rename tests
-
- 22 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
Implies MSRV 1.56.x
-
- 21 Dec, 2021 1 commit
-
-
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 Palm <dvdplm@gmail.com>
-
- 20 Dec, 2021 1 commit
-
-
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:
David <dvdplm@gmail.com> * Update client/core-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * cargo fmt * Update client/ws-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * Update client/ws-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * 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:
David <dvdplm@gmail.com>
-
- 17 Dec, 2021 1 commit
-
-
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 <niklasadolfsson1@gmail.com> * fmt * Feature gate the Client trait * Move `Client` traits to `client` module Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 10 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 30 Nov, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix(types): use `Cow` for deserializing `str` * use ToString
-
- 15 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 11 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix(ParamsSer): serialize to empty array Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec. * fix tests * remove ParamsSer::NoParams * address grumbles: adjust rpc params macro
-
- 16 Sep, 2021 1 commit
-
-
David authored
* Re-export v2::params, error, request and response types * Use shallow type paths
-
- 15 Sep, 2021 1 commit
-
-
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
-
- 14 Sep, 2021 1 commit
-
-
David authored
* Add a test illustrating how to use the `call` convenience method * Extend test + review feedback * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * Add Methods::test_subscription Log more when params parsing fails * Add call_with test helper (ty @niklas!) + cleanup * Remove todo (part of https://github.com/paritytech/jsonrpsee/issues/457 ) * fmt * Let `test_subscription` be called from other crates * Manually fix indentation * fmt * SSself-review grumbles * CallError::InvalidParams carries an anyhow::Error * fmt * Tweak docs * Update utils/src/server/rpc_module.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * review grumble * Fix todos * fmt * Fixup error messages * Include source in the error message for `CallError` * fmt * Update proc-macros/src/render_server.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * Mention needing jsonrpsee crate in scope * Resolve todo * Impl ToRpcParams for 0-sized array * optimized logging Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
-
- 25 Aug, 2021 1 commit
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 13 Aug, 2021 1 commit
-
-
Niklas Adolfsson authored
Co-authored-by:
David Palm <dvdplm@gmail.com>
-
- 12 Jul, 2021 1 commit
-
-
David authored
* Include "macros" in the "server" feature * Re-export SubscriptionSink * Include the "types" feature in both the "client" and "server" features Export types::* from façade when the "types" is active Export types::* from servers * fmt * Export jsonrpsee_types under types * fmt * broken doc link * fix benches * fmt * Fix test imports
-
- 08 Jul, 2021 1 commit
-
-
David authored
* [clients]: use request timeout by-default * add timeout for notif * more feature flag mess * rexport tokio types * Update ws-client/src/client.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * Impose a timeout on all requests Variant of #367 This PR takes a more opinionated stance than #367, where timeouts are optional. In this PR I suggest we make a all requests use a timeout and only let users choose the length. * fmt * Address review grumbles * fmt * Use tokio::select! for cleaner code Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Maciej Hirsz <hello@maciej.codes>
-
- 24 Jun, 2021 1 commit
-
-
Niklas Adolfsson authored
* [jsonrpsee types]: unify types + more tests * address grumbles
-
- 19 May, 2021 1 commit
-
-
Niklas Adolfsson authored
* get started * add additional test * fix nits * cargo fmt * [types]: write some tests. * [http server]: send empty response on notifs * [http server]: fix tests * [rpc module]: send subscription response * Update types/src/v2/error.rs * fix nits * cargo fmt * Update types/src/v2/params.rs * remove needless clone * remove dead code * [types]: impl PartialEq for JsonErrorObject + test * use beef::Cow * Update http-server/src/tests.rs
-
- 12 May, 2021 1 commit
-
-
Billy Lindeman authored
* Rename NotifResponse to SubscriptionResponse to make room for new impl * Add support for on_notification Subscription<T> types * Fix handling of NotificationHandler in manager * cleanup * Implement NotificationHandler to replace Subscription<T> and clean up plumbing * More cleanup * impl Drop for NotificationHandler * Address pr feedback #1 * ws client register_notification pr feedback 2 * Fix doc * fix typo * Add tests, get NH working * More cleanup of String/&str * fix doc * Drop notification handler on send_back_sink error * ws client notification auto unsubscribe when channel full test
-
- 20 Apr, 2021 1 commit
-
-
Niklas Adolfsson authored
* rewrite me * v2 * PoC works without batch request * remove `PartialEq` bounds * add naive benches types * misc * remove useless lifetime * [ws client]: move request ID generation to client * make tests compile again * [client transport]: kill leaky abstractions. * [http client transport]: minor changes in the API. * [ws client]: fix batch requests. * fix nits * [ws client]: generate two request IDs for subscrib * fix tests * remove unused types + less alloc for params. * fix nits * more tweaks. * remove unused code * fix more nits * remove unused legacy types * reorg types_v2 mod * port macros to new types * fix tests again; more jsonvalue * [proc macros]: bring back impl Into for params. * fix build * [proc macros]: make it work for external crates. * [types]: remove weird From<Option<T>> to impl. * cleanup again * [examples]: remove unused async-std dep * Update types/src/v2/mod.rs * [types]: remove unsed dep smallvec * rewrite me * [types]: error code impl ser/deser Manual implementation of serialize/deserialize to get rid of duplicated message string * [types v2]: re-org with explicit mods * fix faulty test * add missed files * [ws client]: req_manager reserve unsubscribe slot. * simplify test code * add tracking issue for TODO * remove unused deps
-