jsonrpsee:5af1282471b20d34e4601f935c7fdacfc33fdada commits
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commits/5af1282471b20d34e4601f935c7fdacfc33fdada
2022-07-27T15:45:48+03:00
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/5af1282471b20d34e4601f935c7fdacfc33fdada
tower_http: Resubmit the same request for testing
2022-07-27T15:45:48+03:00
Alexandru Vasile
alexandru.vasile@parity.io
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/25e331705c726c80b0072ad0c1ec5195a13f0f3b
tower_http: Fix warnings
2022-07-27T15:31:53+03:00
Alexandru Vasile
alexandru.vasile@parity.io
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/1e7dcdfa41250a333e5b5b757c1af45cacd49875
http: Ensure service works with tower
2022-07-27T15:27:53+03:00
Alexandru Vasile
alexandru.vasile@parity.io
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/26871deabbc5f15e89b25feb3ddf78228d75585e
tower_http: Fix warnings
2022-07-27T13:35:41+03:00
Alexandru Vasile
alexandru.vasile@parity.io
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/7c74b0fc6ea9df004aaf7208495473b753b87045
examples: WIP tower service
2022-07-25T17:58:56+03:00
Alexandru Vasile
alexandru.vasile@parity.io
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/42759bbb886fc33a6fac96359232906618537e44
feat(middleware): expose type of the method call (#820)
2022-07-20T16:24:52+01:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/3ee635ff108ccdc1045e430aaadcf9dfe5447b67
middleware refactoring (#793)
2022-07-06T17:45:53+02:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* 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
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/75dc45f87be712531ce7f1cdb774076dc1dab216
Move examples under dedicated folder to simplify `Cargo.toml` (#769)
2022-05-13T15:23:11+02:00
Alexandru Vasile
60601340+lexnv@users.noreply.github.com
* Move examples under dedicated folder to simplify `Cargo.toml`
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
* Fix readme links for examples
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
* Fix deadlinks
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io"><img alt="default avatar" src="https://secure.gravatar.com/avatar/3c353e4a2ea02e51431a5c0e7e876a62?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">Alexandru Vasile</a> <<a href="mailto:alexandru.vasile@parity.io" title="alexandru.vasile@parity.io">alexandru.vasile@parity.io</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/34c2fbef59ca0bdae3b1c5fef0c355ed518ef8cd
feat(http server): add new builder APIs `build_from_tcp` and `build_from_hype...
2022-04-01T22:34:52+02:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* unify servers; use tokio::TcpListener
* add API to build server from tcp socket
* build_from_tcp nit: not async
* fix nits
* change `build_from_tcp` force users configure hyper
The hyper settings might contradict to settings on the provided
socket, force users of this API to configure that avoid confusion and
unexpected settings.
* Update http-server/src/server.rs
* fix doc links
* add separate APIs `build_from_tcp` and `build_from_hyper`
* fix clippy
* remove dead code
* fix build
* fix nit in example code
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/292bd88a998bb2b30a078751554ef222ce90dfbf
extract async client abstraction. (#580)
2021-12-20T17:08:00+00:00
Niklas Adolfsson
niklasadolfsson1@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/e159c449551ebcfc99f05510fbac0c74e4443322
Crate restructuring (#590)
2021-12-17T15:57:32+01:00
Maciej Hirsz
1096222+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/1657e26b7461d5fe52d98615ce5064f18c829859
Middleware for metrics (#576)
2021-12-01T09:17:58+00:00
Maciej Hirsz
1096222+maciejhirsz@users.noreply.github.com
* Squashed MethodSink
* Middleware WIP
* Passing all the information through
* Unnecessary `false`
* Apply suggestions from code review
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>
* Add a setter for middleware (#577)
* Fix try-build tests
* Add a middleware setter and an example
* Actually add the example
* Grumbles
* Use an atomic
* Set middleware with a constructor instead
* Resolve a todo
* Update ws-server/src/server.rs
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>
* Update ws-server/src/server.rs
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>
* Update ws-server/src/server.rs
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: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>
* Middleware::on_response for batches
* Middleware in HTTP
* fmt
* Server builder for HTTP
* Use actual time in the example
* HTTP example
* Middleware to capture method not found calls
* An example of adding multiple middlewares. (#581)
* Add an example of adding multiple middlewares.
* Update examples/multi-middleware.rs
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>
* Update examples/Cargo.toml
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: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>
* Move `Middleware` to jsonrpsee-types (#582)
* Move `Middleware` to jsonrpsee-types
* Move Middleware trait to jsonrpsee-types
* Add some docs.
* Link middleware to `with_middleware` methods in docs
* Doctests
* Doc comment fixed
* Clean up a TODO
* Switch back to `set_middleware`
* fmt
* Tests
* Add `on_connect` and `on_disconnect`
* Add note to future selves
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/e2d4722c25bec808e24d53605e4b87a7323afac2
feat: make it possible to try several sockaddrs when starting server (#567)
2021-11-17T11:29:48+01:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* fix: enable several sockaddress when starting servers
* nits
* more verbose asserts in rustdoc tests
* fix tests
* fix tests again
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6dac20da11305f59707280fa5acf8b46de014316
ws server: respect max limit for received messages (#537)
2021-11-09T14:57:30+00:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* ws server: don't kill connection max limit exceeds
* Update ws-server/src/server.rs
* actually use max size in soketto
* rewrite me
* improve logs
* use soketto fix
* rewrite me
* fix nit
* revert unintentional change
* use soketto 0.7.1
* fix logger
* Update ws-server/src/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>
* Update ws-server/src/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>
* Update ws-server/src/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>
* Update ws-server/src/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>
* Update ws-server/src/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>
* fix build
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/afcf411d9bbf1fce95caacab8b5e66857880064b
Allow awaiting on server handles (#550)
2021-11-08T15:57:06+00:00
Chris Sosnin
48099298+slumber@users.noreply.github.com
* Implement Future for server handles
* Explicitly assert timeout errors in tests
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/37474f45760ffaeb1d1b2a766a4907c6f1a3a0c2
switch to the tracing crate (#525)
2021-10-15T13:13:34+00:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6fb61dc189104db62309f516ae9cec55af73db62
[http server]: use tokio::spawn internally in `HttpServer::start` and return ...
2021-10-11T18:13:50+00:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* [ws server]: refactor start()
* remove needless clone
* fix http server too
* fmt
* unify stop APIs
* fix bad merge
* add API to use custom tokio runtime
* use futures oneshot
* fix unintentional change
* Revert "use futures oneshot"
This reverts commit 0432f6ba41d49a3494943458657a31f8afd79160.
* Update http-server/src/server.rs
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: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>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/fdad3bdd4b28fe12d885d70f0ff3306f5e486123
Add macro to build params (#496)
2021-10-01T13:31:49+02:00
David
dvdplm@gmail.com
* Add a convenience macro to build `ParamsSer` for use in clients
* Add actual macro
* fmtwtf
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/d188da709fd16dd238b6dbd52d81a66dcbc25f45
Add license headers where missing and update year (#439)
2021-08-25T12:35:38+00:00
David
dvdplm@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/8db65b4265d389b521499f736d89d47ba4ae005c
Module API refactor (#412)
2021-07-12T18:58:12+00:00
Maciej Hirsz
1096222+maciejhirsz@users.noreply.github.com
* Do not register methods on servers
* fmt
* Infallible `to_rpc` proc macro
* Remove dead code
* Check for duplicate names at compile time
* Add a UI test for name conflicts
* Apply suggestions from code review
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 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/0592442e1ff9607053cd86f4b399acf20c541ca3
Rexport types for servers (#409)
2021-07-12T08:43:42+00:00
David
dvdplm@gmail.com
* 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
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/c2c66e1a17ceeeaa51ce57fdfef09f06f7f4eada
Unify RpcModule types (#350)
2021-06-01T11:30:47+02:00
David
dvdplm@gmail.com
* Remove register_* from Server
* Tests pass
* Some cleanup
* more cleanup
* Less bounds
* Remove the `RpcMethod` trait – I don't think we need it.
* fmt
* Fix benches
* Enable merging two modules with different contexts
* Module registration returns number of methods on the server and checks for dupes
Tests for module registration and some cleanup
* Export `RpcModule` from façade crate
fmt
* Revert to return error from `Server::register_module`
* Remove Server::methods
* Remove TODO
* Fix tests
Fix http server to work the same as ws-server
* Server::method_names
* fmt
* fix clippy warnings
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/bfe158296ede04c83cf2d2e7750494f14f34a41f
Switch from anyhow::Result to std Result (#333)
2021-05-24T11:25:37+00:00
David
dvdplm@gmail.com
* Switch from anyhow::Result to std Result
* fmt
* Use thiserror `#[from]`
* Remove sadness
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/31153ac771bb00bdd376130ebeb4fee53f1d0108
[client] use types v2 (less alloc) (#269)
2021-04-20T14:02:07+02:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* 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
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/5fd1b9be879414b63107f96622435121539e55d0
add `jsonrpsee` root crate (#260)
2021-04-15T13:50:03+02:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* 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: <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>
* re-export types
* [proc macros]: remove unused features
* Update proc-macros/Cargo.toml
* fix bad merge
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/498997405f9fa78ca9086fca335d4947e60443cd
HTTP server refactor (#253)
2021-04-01T18:16:42+02:00
Niklas Adolfsson
niklasadolfsson1@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 constants
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/50d8bf7827491f1f3c9a55e4f11689a5a65b0b6b
feat: client trait + porting client proc macros (#199)
2021-03-02T13:02:56+01:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* 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: <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 types/src/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 types/src/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 types/src/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 types/src/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>
* remove old proc macro tests
* address grumbles: shorter lines
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/4025c0f67298ab7216214feac4e2c29ca9b24710
fix: include `examples` in the workspace (#194)
2021-01-27T16:59:10+01:00
Niklas Adolfsson
niklasadolfsson1@gmail.com
* fix examples
* fix nit
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/61656562378f10327a585ff2b23d8d885b5acccc
merge v2 to master (#180)
2021-01-18T10:37:11+01:00
Niklas Adolfsson
niklasadolfsson1@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>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/dc56d058b57e25010786f7ee3daf9f196674d57e
Adds a ws_server function at the root, and remove some async qualifiers (#112)
2020-06-29T15:46:35+02:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Adds a ws_server function at the root, and not some async qualifiers
* Rustfmt
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/d5c911a45c142aa7a606932902a56371ed2ac816
Makes the crate's API way more understandable (#96)
2020-02-28T12:29:46+01:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Move common to crate root
* Move transport traits to own module
* Hide transport::client and transport::server
* Move ws and http to transport
* Typo fix
* Remove the shortcuts for raw client and servers
* Rename core to raw
* Remove commented-out code
* Fix docs of raw module
* Rustfmt
* Force inline
* Rustfmt
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/3090cd82fe0eb1cc8a529e98a8df5be032876f17
Update to stable futures (#77)
2020-01-09T10:56:34+01:00
Andrew Jones
ascjones@gmail.com
* Update to stable futures
* Fix breaking hyper and tokio changes
* Fix breaking soketto changes
* Try to fix hyper update errors
* Fix remaining hyper compilation error
* Update futures timer
* Update to tokio 0.2
* Enable basic_scheduler
* Enable logging in example
* Bind server inside runtime context
* Format code
* Return error via channel if async server bind fails
* Apply suggestions from code review
Co-Authored-By: <span data-trailer="Co-Authored-By:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
* Question mark
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/ba6fef6fac40f2f688816dd8d446b0ab91023c53
Rename Client/Server to RawClient/Server and SharedClient/Server to Client/Se...
2020-01-03T12:58:04+01:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Rename Client/Server -> RawClient/RawServer
* SharedClient/Server -> Client/Server
* Rename http/ws constructors
* Rustfmt
* Fix some bad renames
* Rustfmt
* More fixing
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/78ce41f842a869bfcf3409dcc61732ebdab00cd1
Apply Rustfmt and add a CI check (#63)
2019-11-18T13:14:03+01:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Apply Rustfmt and add a CI check
* Install rustfmt
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/19c031e5f37b60204e1603e039cbf1dae44e64e4
Add license header everywhere (#35)
2019-10-29T17:34:13+01:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Add license header everywhere
* Update company name
* Fix bad merge
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/77a2924adde5b301b39b399c592a1d47abc98294
Make notifications work with the proc macro (#38)
2019-10-22T10:09:24+00:00
Pierre Krieger
pierre.krieger1708@gmail.com
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/cdeed9d561ca99214894c860b13f780545f9c6d3
Introduce attributes in the proc macro (#14)
2019-09-18T22:17:00+02:00
Pierre Krieger
pierre.krieger1708@gmail.com
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/be2b56afafb2eb907c85b314a9e9a58864c1e2e8
Properly support params in rpc_api! (#16)
2019-09-18T17:58:49+02:00
Pierre Krieger
pierre.krieger1708@gmail.com
* Properly support params in rpc_api!
* Respond with invalid param in case of parsing error
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/0edb1f41fff24ef332c058fba33eca31815f2413
More work
2019-09-12T16:12:12+02:00
Pierre Krieger
pierre.krieger1708@gmail.com
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/086ab8340a0af02ba3599ded18abae30f8e300b3
Rustfmt
2019-09-11T16:13:16+02:00
Pierre Krieger
pierre.krieger1708@gmail.com