- Aug 25, 2021
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Aug 18, 2021
-
-
Niklas Adolfsson authored
* rewrite me * require proc macro API to return result * send unknown message when error is not CallError * show example that auto cast StdError doesn't work * register_*_method Into<Error> * clippy * replace generic errors with anyhow::Error * fix nits * example that anyhow::Error in register_method works * CallError: add missing From impl * [types]: add helper methods for Error types The rationale is to make it possible for users to either use anyhow::Error or use the helper methods. * fmt * Revert "register_*_method Into<Error>" This reverts commit 33b4fa28730b72647ba150659d3c0ab1937e524a. * add better comment * fix nit
-
- Aug 13, 2021
-
-
Niklas Adolfsson authored
Co-authored-by: David Palm <[email protected]>
-
- Aug 05, 2021
-
-
Niklas Adolfsson authored
* fix(ws client): use query part of URL. Fixes #428, we didn't take that query part of the URL into account and it wasn't sent in GET request. * add log when connecting to a target * fix(grumbles): path -> path_and_query
-
- Jul 12, 2021
-
-
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
-
- Jul 08, 2021
-
-
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 <[email protected]> * 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 <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
- Jun 24, 2021
-
-
Niklas Adolfsson authored
* [jsonrpsee types]: unify types + more tests * address grumbles
-
- Jun 03, 2021
-
-
Niklas Adolfsson authored
* [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * Update types/src/traits.rs * fix bad merge * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: subscribe_method -> subscribe_to_method * Update tests/tests/integration_tests.rs Co-authored-by: David <[email protected]> * grumbles: doc links Co-authored-by: David <[email protected]>
-
Igor Aleksanov authored
* Stick test code to a single runtime * Replace async-std in ws-client with tokio * Replace std::thread::sleep with tokio::time::sleep in test * Add compatibility layer for tokio v0.2 * Add check for both features being enabled + some improvements * Update ws-client/src/tokio.rs Co-authored-by: Niklas Adolfsson <[email protected]>
-
- May 28, 2021
-
-
- May 27, 2021
-
-
Niklas Adolfsson authored
* [ws client]: return last seen error in connect * address grumbles * Update ws-client/src/transport.rs * clippy
-
- May 25, 2021
-
-
Niklas Adolfsson authored
* [ws client]: parse `path` from the URL This commit changes that the path/HTTP resource path is parsed from the URL and removes that option from WsClientBuilder. * address grumbles: introduce `RemoteWsTarget` type. * grumbles: RemoteWsTarget -> Target * cargo fmt
-
- May 22, 2021
-
-
Igor Aleksanov authored
* Add extension trait to timeout the futures execution * Use timeout for ws-server tests * Use timeout for ws-client tests * Use timeout for http-server tests * Use timeout for http-client tests * Make TimeoutFutureExt interafaces more explicit
-
- May 21, 2021
-
-
Niklas Adolfsson authored
-
- May 19, 2021
-
-
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
-
- May 17, 2021
-
-
Albin Hedman authored
* Add custom_certificate to WsClientBuilder * Use system certs instead of specified file * Cache client_config * Move client_config logic to fn build * Default use_system_certificates to true * Move out connector * Add CertificateStore type * cargo fmt * cargo clippy * Resolve comment: Rename variable * Resolved comments
-
- May 12, 2021
-
-
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
-
- May 04, 2021
-
-
Niklas Adolfsson authored
* ret err if context/params fails * address grumbles: specific error_code context fail * address grumbles: make env_logger dev-dependency * address grumbles: add tests * chore(deps): remove unused deps * address grumbles: rename types and docs * address grumbles: more renaming. * fix build
-
- Apr 26, 2021
-
-
Niklas Adolfsson authored
* [types]: allow `data` field in jsonrpc error obj. * fmt * revert change to make fail * remove redundant test * [types]: bring back `data` and `message` in error. Basically deducing the error message from server defined error doesn't work and we should not strip out this information from to user which might be useful. * remove boiler plate code * [types]: impl From<ErrorCode> for JsonRpcError * address grumbles * remove more boiler plate
-
David authored
I went over all the atomic operations and realised I could not convince myself that all uses of `Relaxed` were ok, so better safe than sorry: let's switch to `SeqCst`.
-
Niklas Adolfsson authored
-
- Apr 24, 2021
-
-
Tomasz Drwięga authored
* Fix race conditions. * 🥵 * Use SeqCst ordering.
-
- Apr 21, 2021
- Apr 20, 2021
-
-
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
-
- Apr 19, 2021
-
-
Svyatoslav Nikolsky authored
* reclaim request id for unsubscribe requests * fmt * cargo fmt * [tests]: ignore https and wss requests. Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Apr 15, 2021
-
-
Niklas Adolfsson authored
* add wrapper crate * add jsonrpsee crate back * [jsonrpsee]: feature gate modules * [proc macros]: support crate renaming of `types` * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * re-export types * [proc macros]: remove unused features * Update proc-macros/Cargo.toml * fix bad merge Co-authored-by: David <[email protected]>
-
- Apr 12, 2021
-
-
dependabot[bot] authored
* Update webpki requirement from 0.21 to 0.22 Updates the requirements on [webpki](https://github.com/briansmith/webpki) to permit the latest version. - [Release notes](https://github.com/briansmith/webpki/releases) - [Commits](https://github.com/briansmith/webpki/commits ) Signed-off-by: dependabot[bot] <[email protected]> * update webpki Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Apr 01, 2021
-
-
Niklas Adolfsson authored
* [ws client]: client builder for uniform API * Update ws-client/src/transport.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs
-
- Mar 31, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* feat(http client): batch requests * fix(http batch request): request in any order. * Update src/types/jsonrpc/id.rs * tests(batch out-of-order): make it less confusing. * fix nit: `cloned` -> `copied` * fix bad merge * [client]: batch request generic response * wait with impl * [ws client]: add template for batch requests * remove jsonvalue * naive impl * fix make it work, The implemenation is quite inefficient because the responses might be unordered. Currently, a "digest" of a BTreeSet is stored to sort the requestIDs and don't have to try all combinations of requestIDs in the response. * fix nits * error handling * fix nits * more nits * use error msg pattern * add batch requests to client trait Keep it simple by require `Vec<(Method, Params)>` could be improved. * address review comments: use swap_remove Replace read values with `Vec::swap_remove` instead inserting dummy value. The reason is that `Vec::remove` is O(n) * address review grumbles: batch trait bound Default * don't be clever * [http client]: faster lookup for batch request. * fix: distguish request_id and batch_id * thanks clippy * fix: clarify bad response with a separate error * fix tests * add issue link to todo * Update types/src/error.rs Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- Mar 16, 2021
-
-
Niklas Adolfsson authored
* [ws client]: unsubscribe directly When a subscription is dropped because of `max_notifs_per_subscription` is exceeded the client didn't send an `unsubcribe request` until the subscription was dropped which this commit fixes. This causes the server to still send messages to the subscription and the client would get lots of error messages `InvalidRequestId` * address grumbles * fix: rephrase and not use request everywhere.
-
Greg Hill authored
* add shutdown receiver to ws-client Signed-off-by: Gregory Hill <[email protected]> * ws-client: no clone, use AtomicBool for shutdown signal Signed-off-by: Gregory Hill <[email protected]> * store not swap Signed-off-by: Gregory Hill <[email protected]> * doesn't need to be async, update doc comment Signed-off-by: Gregory Hill <[email protected]> * address review: use existing backgroud channel Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Mar 12, 2021
-
-
Greg Hill authored
* ignore front-end receiver close on process_response Signed-off-by: Gregory Hill <[email protected]> * simplify errors on sending to front * fix import nit Co-authored-by: Niklas Adolfsson <[email protected]>
-
Niklas Adolfsson authored
* implement background error reporting * introduce new error variant * [ws client]: remove `Clone` Breaking change which removes the `Clone` on the `WsClient`. It's better that users explictly makes it clone if that's desired, for example by putting it in `Arc<Mutex>`. * fix build * Update ws-client/src/client.rs * remove unused arc * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * fix rustdoc link Co-authored-by: David <[email protected]>
-
- Mar 09, 2021
-
-
Niklas Adolfsson authored
* [ws client]: register request ID for unsubscribe. Fixes #220 * refactor manager usage * restrict request ID to u8 * Update ws-client/src/tests.rs * rename `max_notifs_per_subscription_capacity` * Update tests/src/lib.rs * fix nits * address grumbles: vecdeq for free slots * resolve todo * [request manager]: add test for max limit. * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * fix stack overflow * grumbles: MaxMemory -> MaxSlots * address grumbles: stray capacity on configs * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: stray confusing docs * grumbles: doc nits * grumbles: remove nested if let Co-authored-by: David <[email protected]>
-
- Mar 04, 2021
-
-
Niklas Adolfsson authored
* prep for client release. * fix nits * add changelogs * Update http-client/src/lib.rs Co-authored-by: David <[email protected]> * address grumbles: one changelog * 0.2.0-alpha * revert rust2018 lint Co-authored-by: David <[email protected]>
-
- Mar 02, 2021
-
-
Niklas Adolfsson authored
* draft: client trait sketch... * use async_trait instead of `Box<Future>` * refactor client trait * [types]: shared client types. * integrate with `jsonrpsee_proc_macros::rpc_api` * Update proc-macros/src/lib.rs * integrate with proc macros * fix: hacky support for generic types in proc macro * fix: make the examples work. * trait: error associated type * Update types/src/traits.rs * client trait: make object safe. Make the trait usable as a trait object i.e, `Box<dyn Trait>` * client trait: remove `Self::Sized` * add tests for proc macros. * fix build * fmt * [client trait]: remove unused associated error typ * [proc macros]: separate enum variant each return_t * add tracking issue to `TODO` * doc(client trait): improve documentation. * separate trait for subscribing client * add documentation * proc macros: remove debug impl * fix compile warns * address grumbles: remove fn process_response * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * remove old proc macro tests * address grumbles: shorter lines Co-authored-by: David <[email protected]>
-
- Feb 23, 2021
-
-
Maciej Hirsz authored
* Re-apply changes * Fixed tests * 3 to go * Passing tests! * Fix formatting * Fix formatting in tests * Fixed examples * Bind listener when server starts * Formatting, disable deadlock test to check CI * Fixed deadlock test * Fix benches * Remove dead code * Restoring unit tests * Restored all unit tests * Missing unwraps Co-authored-by: Niklas Adolfsson <[email protected]> * Missing unwraps Co-authored-by: Niklas Adolfsson <[email protected]> * Typo :) Co-authored-by: Niklas Adolfsson <[email protected]> * Remove broken connections from subscriptions * Tweak tests * Add some doc comments Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Feb 18, 2021
-
-
Niklas Adolfsson authored
* test(ws client): wss (TLS) * fix(ws client): bug replace target with host. * address review suggestions * tests: add tests for non-ascii URLs * refactor: impl TryFrom for WebSocketTransportBuild * fix nit: try to connect to all sockaddrs * document `Host type` * doc(ws client): default port. * remove helper function
-