jsonrpsee:292bd88a998bb2b30a078751554ef222ce90dfbf commitshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commits/292bd88a998bb2b30a078751554ef222ce90dfbf2021-12-20T17:08:00+00:00https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/292bd88a998bb2b30a078751554ef222ce90dfbfextract async client abstraction. (#580)2021-12-20T17:08:00+00:00Niklas Adolfssonniklasadolfsson1@gmail.com
* 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: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update client/core-client/src/lib.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* cargo fmt
* Update client/ws-client/src/lib.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update client/ws-client/src/lib.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* 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: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/e159c449551ebcfc99f05510fbac0c74e4443322Crate restructuring (#590)2021-12-17T15:57:32+01:00Maciej Hirsz1096222+maciejhirsz@users.noreply.github.com
* 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: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas Adolfsson</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
* fmt
* Feature gate the Client trait
* Move `Client` traits to `client` module
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas Adolfsson</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/fdad3bdd4b28fe12d885d70f0ff3306f5e486123Add macro to build params (#496)2021-10-01T13:31:49+02:00Daviddvdplm@gmail.com
* Add a convenience macro to build `ParamsSer` for use in clients
* Add actual macro
* fmtwtfhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/d188da709fd16dd238b6dbd52d81a66dcbc25f45Add license headers where missing and update year (#439)2021-08-25T12:35:38+00:00Daviddvdplm@gmail.com
* Add license headers where missing and update year
* Update examples/http.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas Adolfsson</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas Adolfsson</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/32811d3ce2dc0095e5452524a8492fcc96d5cc43[clients]: remove tokio 0.2 runtime support (#432)2021-08-13T14:30:34+00:00Niklas Adolfssonniklasadolfsson1@gmail.com
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David Palm</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/094b10db61c59ec09d0a20f23e0056f0548fa288Enable docs/debug/pub warnings for server and types crates (#360)2021-06-02T12:55:40+00:00Igor Aleksanovpopzxc@yandex.ru
* Enable docs/debug/pub warnings for server and types crates
* Remove Debug bound on Notif
* Stick to deriving debug
* Update utils/src/server/rpc_module.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/4316ec7d86e5a8630b1ac96ada527dc2d32fa35erefactor utils crate (#264)2021-04-12T11:37:42+00:00Niklas Adolfssonniklasadolfsson1@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/498997405f9fa78ca9086fca335d4947e60443cdHTTP server refactor (#253)2021-04-01T18:16:42+02:00Niklas Adolfssonniklasadolfsson1@gmail.com
* refactor benches
* start
* fix build: enable `raw value` feature serde_json
* start
* port it
* make tests compile
* fix bench
* fix bench
* introduce builder pattern
* tweaks
* remove unused code
* cleanup
* [http server]: configure tcp socket manually.
The major reason is to provide a uniform API with the WebSocket server to return the local address.
* remove unused deps
* [examples]: remove needless sleep
* chore: add docs and refactor noise.
* Update types/src/jsonrpc/error.rs
* http server use constantshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/eb4f5b32cb88642ae234279757985d888b960098feat(http client): support tokio02 via hyper 0.13 (#201)2021-02-15T11:50:37+01:00Niklas Adolfssonniklasadolfsson1@gmail.com
* feat(http client): support tokio02 via hyper 0.13
* fix: address review suggestions.
* [ci]: update to work again
* deps(http client): remove unused hyper features
* grumbles: replace \" with ` in compile_error!https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/61656562378f10327a585ff2b23d8d885b5accccmerge v2 to master (#180)2021-01-18T10:37:11+01:00Niklas Adolfssonniklasadolfsson1@gmail.com
* update http example
* ungeneric crate
* update dependencies
* [client]: add WebSocket client again.
* [deps]: remove needless dev dependencies
* nits: forgot to commit new files
* [ws client]: `send_text` instead of `send_binary`
This is temporary fix to work with the `server` which assumes that
`WebSocket` resonses are `text`
* chore: add a bunch of more logging
* [ws]: port tests but some are failing.
* chore: fmt
* [server API]: expose `fn local_addr` as public API.
* [tests]: make them less ugly by using `127.0.0.1:0`
* fix: a bunch of compiler warnings.
* [api]: uniform naming, `bind -> new` in transport.
* [websocket server]: reply when deserial fails
When the server receives an request with invalid JSON
`-32700, Parse error shall be returned`
* chore: fmt
* [tests]: fix remaining tests
* [websocket server]: support `binary` and `text`
* [ws server]: fix bug in subscription response.
`.await` was missing in RegisteredSubscription::send() and no responses
were actually sent which this commit fixes.
* [client API]: export `WsSubscription`
* [examples]: use `localhost` instead of `127.0.0.1`
Hostname is required when using `wss` and `127.0.0.1` is not valid hostname.
* [examples]: add subscription example.
* chore: fmt
* [ws server]: fix bug register new subscription.
Fixes newly introduced bug that causes `register_subscription` to have
side-effects even if the subscription fails.
* fmt
* more uniform logs
* [ws server]: simple subscription test.
* [ws server]: subscription tests improved.
* [tests]: extract test helpers to a separate crate (#125)
* [ws server]: don't close connection when `deserialization` fails (#131)
* [ws server]: don't close conn. when `deser` fails
* Update src/ws/transport.rs
* grumbles: prefer matching of if else.
* chore: CI warn `intra_doc_link_resolution_failure` (#139)
Since we have not updated the documentation properly it's annoying that
the entire job fails.
* chore: rustfmt.toml (#138)
* chore: add `rustfmt.toml` for formatting
* style: `cargo fmt --all` with new config
* [server raw params]: fix debug implementation (#137)
* [server]: simply raw params impl
Use debug implementation of `common::Params` instead of doing something
similar that doesn't work properly.
* [raw params]: derive `Debug` impl.
* [ws server]: parse subscription ID for unsubscription instead of hardcoding `JsonValue::Null` (#136)
* [ws server]: fix broken unsubscribe.
Try to parse the subscription ID as the first element of an Array or the `subscription`
field of an Object/Map.
If both of those fails then regard it as a error.
* fmt
* fix grumbles: remove space indentation
* fix(ws server): sub/unsubscribe to same method should generate an error (#140)
* fix(ws server): sub/unsubscribe to same method err
Subscribe and unsubscribe to the same method should generate an error, which this commit fixed.
This bug was introduced by myself in <a href="https://github.com/paritytech/jsonrpsee/commit/fc87889de2615dbb3d0cf2d91a306f016d48df2d" rel="nofollow noreferrer noopener" target="_blank">https://github.com/paritytech/jsonrpsee/commit/fc87889de2615dbb3d0cf2d91a306f016d48df2d</a>
* Update src/ws/server.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* chore: add naive benches for request/response (#142)
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
* fix(ws server): remove faulty debug_assert (#145)
The code assumed that `subscription id` is still in `active_subscriptions` when the
connection was dropped.
The list of subscriptions (kept in raw server) are not notified when a client dropped its
subscription/unsubscribed thus it's possible that the actual subscriptions are closed before the
entire client was dropped.
* ci(benches): cargo check on benches. (#146)
* fix(http client): implement `clone` uniform API. (#147)
* chore(deps): update `futures v0.3.7` (#148)
* chore(deps): update remaining crates (#149)
* chore(deps): update `futures v0.3.7`
* chore(deps): bump the rest of deps
* Improve HTTP client background thread (#150)
* refactor: resultify API + some crate reorg (#144)
* [ws client]: resultify API and fix subscribe.
* The commit changes the API to return `Err` when it's possible and to not ignore underlying errors.
* Fix that `fn subscribe` doesn't accept the subscription and unsubscription to be same which causes
errors in the server.
* nits: Err::SubscriptionMetod -> Err::Subscription
* refactor(client): common error type
* refactor(http client): resultify
* refactor(common): rename common -> types..
This commit renames the `common module` to `types` and tries to distinguish the types that is
directly related to the `JSON-RPC v2 specification` from others.
Somethings are a little big sloppy named as naming is hard.
Also, as bonus a removed a bunch of needless stuff in http server related to subscription.
* Update src/ws/tests.rs
* style: cargo fmt
* fix(grumble): matches -> assert(matches)
* fix(grumbles): `jsonrpc_v2` -> `jsonrpc`
* fix(nit): remove unused code.
* fix(benches): make it compile again.
* style: cargo fmt
* fix nits (#151)
* fix(ws client): send binary (1 byte less payload)
* docs(ws server): fix bad comment.
* chore: add `editorconfig` (#152)
* chore: make `debug log` less verbose. (#153)
* chore: make `debug log` less verbose.
The debug logging was just too verbose and this commit simplies it as follows:
```
DEBUG recv: {"jsonrpc":"2.0","method":"<METHOD>","params":<PARAMS>,"id":<ID>}
DEBUG send: {"jsonrpc":"2.0","result":"<RESULT>","id":<ID>}
```
* style: cargo fmt
* fix: missed logs
* [jsonrpc types]: implement Display for Request/Response (#160)
* feat(jsonrpc response/request): impl `Display`
* refactor(logging): use display impl
* use serde_json for verbosity
* [http client]: refactor with "syncronous-like" design (#156)
* experimental
* ci(benches): sync and concurrent roundtrips
Improve benchmarks to take concurrent requests into account.
* ci(benches): sync and concurrent roundtrips
Improve benchmarks to take concurrent requests into account.
* fix(nits)
* feat(http client): limit max request body size
* test(http transport): request limit test
* test(http client): add tests.
* fix typo
* fix(benches): make it compile again.
* fix(ws example): revert unintentional change.
* test(http client): subscription response on call.
* fix(cleanup)
* fix(benches): make it compile again.
* Update src/client/http/transport.rs
* fix(http client): `&str` -> `AsRef<str>`
* docs(client types): better docs for Mismatch type.
* style: `Default::default` -> `HttpConfig::default`
* fix(http client): read body size from header.
Expermential to read number of bytes from `HTTP Content Length` to pre-allocate the number of bytes and bail early
if the length is bigger than the `max_request_body size`
Need to be benched with bigger requests.
* test(raw http): enable tests to works again.
* style: cargo fmt
* benches: address grumbles
* feat(jsonrpc response/request): impl `Display`
* refactor(logging): use display impl
* fix(http client): nits.
* Update benches/benches.rs
* fix bad merge.
* chore(deps): update dependencies. (#164)
* feat(http server): configurable request body limit (#162)
* feat(http server): configurable request body limit
* refactor(crate reorg): to have shared http helpers.
* Merge client and server errors.
* Move `http_server_utils` to `utils/http`
* Minor cleanup
* fix nits
* fix(hyper helper): u64 -> u32
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix: grumbles
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/http/server.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* ci: remove nightly (#167)
Use stabilized `broken_intra_doc_links` instead of `intra_doc_link_resolution_failure`
* fix(websocket client): drop subscriptions that can't keep up with the internal buffer size (#166)
* fix(ws client): drop subscriptions when full.
This commit changes the behavior in the `WebSocket Client` where each subscription channel is used in a non-blocking
matter until it is determined as full or disconnected. When that occurs the channel is simply dropped and when
the user `poll` the subscription it will return all sent subscriptions before it was and terminate (return None)
once it's polled one last time. Similarly as `Streams` works in Rust.
It also adds configuration for the `WebSocket Client` to configure capacity for the different internal channels to avoid
filling the buffers when it's not expected.
* tests(ws client): simple subscription test.
* fix: nits
* Update src/client/ws/client.rs
* refactor(tests): introduce integration_tests
Make the repo structure more understable w.r.t testing.
* chore(license): add missing license headers
* Update src/client/ws/client.rs
* Update src/client/ws/client.rs
* style: remove unintended spaces.
* tests: add concurrent deadlock test
Ensure that if more than the requested channel buffer capacity is exceeded it should not deadlock.
Such as spawning alot of concurrent requests, notifications or new subscriptions.
* Update src/client/ws/client.rs
* fix: review grumbles
* fix nits: `remove needless closure`
* fix: cargo fmt
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix more nits
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix(ws client): embed request id in `SubscriptionClosed` (#170)
* fix(ws client): embed request id SubscriptClosed
Fixes <a href="https://github.com/paritytech/jsonrpsee/issues/169" rel="nofollow noreferrer noopener" target="_blank">https://github.com/paritytech/jsonrpsee/issues/169</a>
* Update src/client/ws/client.rs
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* chore(deps): bump dependencies (#172)
* [ws client]: add tests (#134)
* [test utils]: add `internal_err` and consts
[errors]: unify client/server errors
[test utils]: fake WebSocket jsonrpc server
[ws client]: export errors
[ws client]: add some basic tests
* fmt
* remove log target
* fix nits
* [ws client]: add subscription test
* revert unintendend changes.
* fmt
* [ws client]: fix panic in tests
* cleanup
* tests(ws client): test for invalid request ID.
* fix nits
* [ws client]: kill raw client (#171)
* getting started
* WIP WIP
* cleanup
* cleanup v2
* cleanup v3
* perf: use BufReader BufWriter
* fix(request manager): resultify insert API
The rationale behind this change is that the `insert_methods` takes ownership of the `send_back_oneshot`
and if the operation fails it should be propagated the frontend.
So returning the `Err(send_back_oneshot)` if it fails makes it possible.
* fix nits
* examples(ws): revert changes
* Update tests/integration_tests.rs
* nits: fix unwraps
* Update src/client/ws/manager.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/transport.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix build
* refactor: simplify `Error::InvalidRequestId`
It was hard to use when the expected id is not known.
* fix(ws client): error handling.
* fix(grumble error type): better error message.
* fix(grumble): docs `JSONRPC WebSocket transport`
* fix(ws manager): fix grumbles.
* Add better documentation
* Rename methods.
* Add `proof` to unreachable!
* fix(ws manager): fix nit in docs.
* fix(grumbles): ws client
* fix more nits
* fix compile warning: export websocket transports.
* Update src/client/ws/manager.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* deps: tokio 1.0 and hyper 0.14 (#176)
* deps: tokio 1.0 and hyper 0.14
* Update Cargo.toml
* refactor: crate re-organization with separate crates (#177)
* [ci]: feature `http` and `ws` removed.
* refactor: re-org crate with smaller crates.
* fmt
* [ci]: remove default features
Currently there are no features in the crates, so that check is not needed.
* [http client]: remove unused dependency tokio
* docs(http client): fix nits tokio 0.2 -> tokio 1.0 (#178)
* docs(http client): tokio 0.2 -> tokio 1.0
* fix: better link
* [ci]: github actions (#179)
* docs(http client): tokio 0.2 -> tokio 1.0
* [ci]: remove travis
* [ci]: add github actions.
* [ci]: fix identation nits
* [ci]: use cache for actions
* [ci]: filter to clippy
* [ci]: remove hacks
* separate action for ci and benchmarks
* [ci]: tweak to run on master branch.
* examples/subscription -> examples/ws_subscription
* force CI
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/e6d3d799a6d38d63090033557bcc0455?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com">Maciej Hirsz</a> <<a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com">1096222+maciejhirsz@users.noreply.github.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/8f3cb6b26547553fbc38bee292319361?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com">Atkins</a> <<a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com">atkinschang@gmail.com</a>></span>