1. Sep 27, 2022
  2. Sep 13, 2022
    • Niklas Adolfsson's avatar
      replace `WS and HTTP servers` with a server that supports both `WS and HTTP` (#863) · bf73876d
      Niklas Adolfsson authored
      
      
      * ws server: support both http and ws
      
      * clean things up
      
      * ws server: add http logger and ws logger
      
      * more cleanup
      
      * fix nits
      
      * middleware example
      
      * remove http and ws server crates
      
      * move things around
      
      * some minor fixes
      
      * fix stop in http context
      
      * fix tests
      
      * fix features
      
      * use header constants
      
      * remove access_control & expose only host filtering
      
      CORS has been removed to tower middleware and doesn't need to supported anymore
      
      * fix merge logging traits + move to server
      
      * supress warnings faulty dead code
      
      * remove unwrap
      
      * support http2
      
      * doesnt work
      
      * feat: simpler stop handling
      
      * Update server/src/future.rs
      
      * some cleanup
      
      * Update server/src/future.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      * Update server/src/future.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      * fix nits
      
      * address grumbles
      
      * commit examples and nits
      
      * clarify comment
      
      * remove noise
      
      * remove impl Future for ServerHandle
      
      * remove needless async {}
      
      * add http2 test
      
      * add ServerBuilder::build_from_tcp
      
      * fix super nit: no more Option<SocketAddr>
      
      * fix Option<SocketAddr>
      
      * Update server/src/future.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      * Update server/src/future.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      bf73876d
  3. Aug 11, 2022
  4. Jun 29, 2022
  5. Apr 20, 2022
  6. Apr 04, 2022
  7. Apr 01, 2022
    • Niklas Adolfsson's avatar
      feat(http server): add new builder APIs `build_from_tcp` and `build_from_hyper` (#719) · 34c2fbef
      Niklas Adolfsson authored
      * 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
      34c2fbef
  8. Dec 17, 2021
    • Maciej Hirsz's avatar
      Crate restructuring (#590) · e159c449
      Maciej Hirsz authored
      
      
      * Nuke V2
      
      * fmt
      
      * Formatting and imports
      
      * Updated benches
      
      * Fix doc comment link
      
      * Brace imports in ws-server
      
      * Reworking imports
      
      * std first
      
      * fmt
      
      * std on top
      
      * Update to match changed line numbers
      
      * Rename jsonrpsee_utils -> jsonrpsee_core
      
      * Migrating things types -> core
      
      * RpcError -> ErrorResponse
      
      * Merge types::client into core::client
      
      * Continued move types -> core
      
      * Removing features to make checks pass
      
      * Move rpc_module tests to tests crate
      
      * Fixed doc comment links
      
      * Add futures-util dependency for client
      
      * Remove dead code
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * fmt
      
      * Feature gate the Client trait
      
      * Move `Client` traits to `client` module
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      e159c449
  9. Nov 19, 2021
  10. Nov 17, 2021
  11. Nov 08, 2021
  12. Oct 17, 2021
    • Niklas Adolfsson's avatar
      benches: add option to run benchmarks against jsonrpc crate servers (#527) · 0b435556
      Niklas Adolfsson authored
      * fix http client bench with request limit
      
      * benches for jsonrpc servers
      
      * workaround; dont use max request limit
      
      * add subscriptions
      
      * revert unintentional change
      
      * ignore batch request bench for ws
      
      * fmt
      
      * log -> tracing
      
      * test bench CI
      
      * test bench v0.3
      
      * wtf; run CI
      
      * work plz
      
      * remove test CI bench
      
      * fix compile warn on macos
      0b435556
  13. Oct 11, 2021
    • Niklas Adolfsson's avatar
      [http server]: use tokio::spawn internally in `HttpServer::start` and return `StopHandle` (#402) · 6fb61dc1
      Niklas Adolfsson authored
      
      
      * [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: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      6fb61dc1
    • Maciej Hirsz's avatar
      Resource Limiting (#500) · 518a6155
      Maciej Hirsz authored
      
      
      * Squash post merge
      
      * RAII claims and some comments
      
      * Adding resources to Methods
      
      * Use arrays for claiming all resources at once
      
      * Register resources on ws-server
      
      * Return MethodResourcesBuilder from register_method
      
      * Return MethodResourcesBuilder from register_async_method
      
      * fmt and comments
      
      * Add `verify_and_insert` to get rid of `or_insert` in order to get mut ref to value
      
      * Resources initialization
      
      * No need for ResourceBuilder
      
      * Comment all the things
      
      * Handle errors on ws-server `start` method
      
      * Passing ResourceGuard to method execution
      
      * Start ws-server in background, simplify all the tests!
      
      * Claiming resources on runtime
      
      * Do checked math on resource claiming
      
      * Clearer error path for resources at limit
      
      * Resource limiting tests WIP
      
      * Unbox async futures
      
      * fmt
      
      * Cleaner proc macro
      
      * Fix lifetime issues with ResourceGuard with internal Arc
      
      * Remove unnecessary lifetime generic
      
      * Working tests
      
      * Use turbofish in tests
      
      * fmt
      
      * Fixed (?) benches
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Tweak more grumbles
      
      * Adding a test for resource limiting with proc macros (WIP)
      
      * Reworking attribute macros for resource limiting (#507)
      
      * Squashed macros WIP
      
      * bae-less macros!
      
      * Make things simpler and more readable
      
      * Some comments and DRY aliases parsing
      
      * Naming things is hard
      
      * Respan is no longer needed
      
      * Simpler Arguments
      
      * Remove stale code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * syn-up all the things, handle resources on methods
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Resource limiting on the http server
      
      * Test two resources at once
      
      * Test the HTTP server for resource limiting
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Comment tweaks
      
      * More explicit error type for `AttributeMeta::retain`
      
      * Remove generic from ResourceTable; derive Default on ws Builder
      
      * Make the macros shorter
      
      Co-authored-by: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      518a6155
  14. Oct 01, 2021
  15. Jul 12, 2021
  16. Jun 14, 2021
  17. Jun 03, 2021
    • David's avatar
      Add a builder to the ws server (#365) · fa1f9e0e
      David authored
      * Add a builder to the ws server
      
      * Use the WsServerBuilder in tests&examples
      
      * cleanup
      
      * fmt
      
      * Fix benches
      
      * fix error message
      
      * Add connection count limiting and associated config item
      
      * Use the strong_count to `methods` to know how many connections we currently have
      
      * Fix test
      fa1f9e0e
  18. Jun 01, 2021
    • David's avatar
      Unify RpcModule types (#350) · c2c66e1a
      David authored
      
      
      * 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: default avatarNiklas Adolfsson <[email protected]>
      c2c66e1a
  19. Apr 16, 2021
  20. Apr 15, 2021
  21. Apr 01, 2021
    • Niklas Adolfsson's avatar
      HTTP server refactor (#253) · 49899740
      Niklas Adolfsson authored
      * 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
      49899740
  22. Mar 31, 2021