- Sep 06, 2022
-
-
Alexandru Vasile authored
* core: Fix doc typo Signed-off-by: Alexandru Vasile <[email protected]> * types: Implement generic `ParamBuilder` for RPC parameters Signed-off-by: Alexandru Vasile <[email protected]> * types: Add specialized RPC parameter builder for arrays and maps Signed-off-by: Alexandru Vasile <[email protected]> * types: Implement parameter builder for batch requests Signed-off-by: Alexandru Vasile <[email protected]> * types: Implement `rpc_params` in the `types` crate Signed-off-by: Alexandru Vasile <[email protected]> * core: Adjust `ClientT` for generic efficient parameters Signed-off-by: Alexandru Vasile <[email protected]> * proc-macro: Render clients using the parameter builders Signed-off-by: Alexandru Vasile <[email protected]> * Adjust testing to the `ToRpcParams` interface Signed-off-by: Alexandru Vasile <[email protected]> * core: Move `rpc_params` to core and simplify testing Signed-off-by: Alexandru Vasile <[email protected]> * core: Rename server's trait to `ToRpcServerParams` Signed-off-by: Alexandru Vasile <[email protected]> * bench: Adjust benches to the `ToRpcParams` interface Signed-off-by: Alexandru Vasile <[email protected]> * Fix clippy Signed-off-by: Alexandru Vasile <[email protected]> * types: Rename batch builder to `BatchRequestBuilder` Signed-off-by: Alexandru Vasile <[email protected]> * examples: Re-enable proc-macro example Signed-off-by: Alexandru Vasile <[email protected]> * types: Fix doc tests and add panic documentation Signed-off-by: Alexandru Vasile <[email protected]> * core: Fix documentation link Signed-off-by: Alexandru Vasile <[email protected]> * client: Use BatchRequestBuilder as parameter for batch requests Signed-off-by: Alexandru Vasile <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * types: Add specialized constructors for internal `ParamsBuilder` Signed-off-by: Alexandru Vasile <[email protected]> * types: Implement `EmptyParams` for client's parameters Signed-off-by: Alexandru Vasile <[email protected]> * tests: Fix macos disabled test Signed-off-by: Alexandru Vasile <[email protected]> * types: Improve comment Signed-off-by: Alexandru Vasile <[email protected]> * Fix clippy Signed-off-by: Alexandru Vasile <[email protected]> * benches: Rename functions Signed-off-by: Alexandru Vasile <[email protected]> * types: Rename param types to `ArrayParams` and `ObjectParams` Signed-off-by: Alexandru Vasile <[email protected]> * Move paramters to core crate Signed-off-by: Alexandru Vasile <[email protected]> * core: Return `core::Error` from `ToRpcParams` trait Signed-off-by: Alexandru Vasile <[email protected]> * Fix doc link Signed-off-by: Alexandru Vasile <[email protected]> * Fix `ArrayParamsBuilder` doc links Signed-off-by: Alexandru Vasile <[email protected]> * Remove `ToRpcServerParams` trait Signed-off-by: Alexandru Vasile <[email protected]> * core: Fix `ToRpcParams` docs Signed-off-by: Alexandru Vasile <[email protected]> * Remove `ParamsSer` and extend benchmarking Signed-off-by: Alexandru Vasile <[email protected]> * core: Optimise `rpc_params` to avoid allocation on error Signed-off-by: Alexandru Vasile <[email protected]> * params: zero allocation for empty params Signed-off-by: Alexandru Vasile <[email protected]> * examples: Add copyright back Signed-off-by: Alexandru Vasile <[email protected]> * traits: Remove empty doc line Signed-off-by: Alexandru Vasile <[email protected]> * Update core/src/traits.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/traits.rs Co-authored-by: James Wilson <[email protected]> * examples: Restore `proc_macro` example to origin/master Signed-off-by: Alexandru Vasile <[email protected]> * core: Remove empty case for `rpc_params` macro Signed-off-by: Alexandru Vasile <[email protected]> Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: James Wilson <[email protected]>
-
- Jul 13, 2022
-
-
Alexandru Vasile authored
* ws-client: Replace `httparse::Header` with `http::HeaderMap` Signed-off-by: Alexandru Vasile <[email protected]> * ws-client: Make headers optional Signed-off-by: Alexandru Vasile <[email protected]> * http-client: Expose custom header injection Signed-off-by: Alexandru Vasile <[email protected]> * http-client: Adjust testing for custom headers Signed-off-by: Alexandru Vasile <[email protected]> * Make `http::HeaderMap` non-optional Signed-off-by: Alexandru Vasile <[email protected]> * http-client: Cache request headers Signed-off-by: Alexandru Vasile <[email protected]> * Fix doc tests Signed-off-by: Alexandru Vasile <[email protected]> * http-client: Use `into_iter` for headers Signed-off-by: Alexandru Vasile <[email protected]> * docs: Improve custom headers documentation Signed-off-by: Alexandru Vasile <[email protected]> * http: Use `hyper::http` instead of `http` directly Signed-off-by: Alexandru Vasile <[email protected]> * http-client: Adjust testing Signed-off-by: Alexandru Vasile <[email protected]> * Fix doc tests Signed-off-by: Alexandru Vasile <[email protected]> * client: Expose `http::HeaderMap` and `http::HeaderValue` Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jul 06, 2022
-
-
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
-
- Jun 01, 2022
-
-
Alexandru Vasile authored
* ws: Implement ping for `TransportSenderT` trait Signed-off-by: Alexandru Vasile <[email protected]> * ws/client: Receive pong frames Signed-off-by: Alexandru Vasile <[email protected]> * core/client: Use `select!` macro for the background task Signed-off-by: Alexandru Vasile <[email protected]> * client: Propagate ping interval to background task Signed-off-by: Alexandru Vasile <[email protected]> * async_client: Submit ping requests Signed-off-by: Alexandru Vasile <[email protected]> * async_client: Handle pong replies Signed-off-by: Alexandru Vasile <[email protected]> * client: Handle frontend messages to dedicated fn Signed-off-by: Alexandru Vasile <[email protected]> * client: Handle backend messages in dedicated fn Signed-off-by: Alexandru Vasile <[email protected]> * client: Add terminated fuse for opt-out pings Signed-off-by: Alexandru Vasile <[email protected]> * Set opt-out behavior for client pings Signed-off-by: Alexandru Vasile <[email protected]> * client: Move imports Signed-off-by: Alexandru Vasile <[email protected]> * client: Handle handle_frontend_messages errors Signed-off-by: Alexandru Vasile <[email protected]> * client: Add custom error related to byteslice conversions Signed-off-by: Alexandru Vasile <[email protected]> * client: Modify `send_ping` to send empty slices Signed-off-by: Alexandru Vasile <[email protected]> * Fix `cargo hack check` and use `select_biased` Signed-off-by: Alexandru Vasile <[email protected]> * Handle sending pings with lowest priority Signed-off-by: Alexandru Vasile <[email protected]> * core: Add proper number of params to `background_task` Signed-off-by: Alexandru Vasile <[email protected]> * Fix wasm client Signed-off-by: Alexandru Vasile <[email protected]> * Handle raw bytes and string received messages Signed-off-by: Alexandru Vasile <[email protected]> * Fix Cargo.toml feature Signed-off-by: Alexandru Vasile <[email protected]> * Panic when empty slice does not fit into `ByteSlice125` Signed-off-by: Alexandru Vasile <[email protected]> * wasm: Add operation not supported for pings Signed-off-by: Alexandru Vasile <[email protected]> * Rename `ReceivedMessage` from Data to Text Signed-off-by: Alexandru Vasile <[email protected]> * Rename test variable Signed-off-by: Alexandru Vasile <[email protected]> * Add documentation Signed-off-by: Alexandru Vasile <[email protected]> * client: Use `future::select` for cancel safety Signed-off-by: Alexandru Vasile <[email protected]> * client: Remove `pong` handling logic Signed-off-by: Alexandru Vasile <[email protected]> * client: Update ping documentation Signed-off-by: Alexandru Vasile <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update core/Cargo.toml Co-authored-by: Niklas Adolfsson <[email protected]> * Update core/Cargo.toml Co-authored-by: Niklas Adolfsson <[email protected]> * logs: Keep debug log for submitting `Ping` frames Signed-off-by: Alexandru Vasile <[email protected]> * Print debug logs when receiving `Pong` frames Signed-off-by: Alexandru Vasile <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: Tarik Gul <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Apr 20, 2022
-
-
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 <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: David <[email protected]> * 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 <[email protected]>
-
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 <[email protected]> * 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 <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: James Wilson <[email protected]> * address grumbles * remove faulty comment * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * fix: don't send `RPC Call failed: error`. * remove debug assert Co-authored-by: James Wilson <[email protected]> Co-authored-by: David <[email protected]>
-
- Mar 30, 2022
-
-
Niklas Adolfsson authored
* refactor: get rid off `Error::Request` variant * fix nit * to_owned -> to_call_error
-
- Jan 21, 2022
-
-
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
-
- Jan 10, 2022
-
-
Niklas Adolfsson authored
* fix(ws client): export `WsClient` * fix build * fix doc links
-
- Dec 20, 2021
-
-
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 <[email protected]> * Update client/core-client/src/lib.rs Co-authored-by: David <[email protected]> * cargo fmt * Update client/ws-client/src/lib.rs Co-authored-by: David <[email protected]> * Update client/ws-client/src/lib.rs Co-authored-by: David <[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: David <[email protected]>
-