1. Apr 05, 2022
  2. Apr 04, 2022
  3. Apr 02, 2022
    • Niklas Adolfsson's avatar
      [examples]: update pubsub examples (#705) · 961e6bd5
      Niklas Adolfsson authored
      * update pubsub examples
      
      * Update examples/ws_subscription.rs
      
      * remove some docs
      
      * remove needless clone
      
      * simplify example
      
      * simplify code with async-broadcast channel
      
      * use tokio broadcast for smaller dependency tree
      
      * Update examples/ws_pubsub_broadcast.rs
      961e6bd5
  4. 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
    • Niklas Adolfsson's avatar
      fix(client): close subscription when server sent `SubscriptionClosed` notification (#721) · f55ab3e3
      Niklas Adolfsson authored
      * fix(client): close subscription when server sent `SubscriptionClosed` notification
      
      * Update core/src/client/async_client/helpers.rs
      f55ab3e3
    • Niklas Adolfsson's avatar
      feat: add `SubscriptionSink::pipe_from_try_stream` to support streams that returns `Result` (#720) · 545ceaf6
      Niklas Adolfsson authored
      
      
      * refactor: make `pipe_from_stream` take stream of result
      
      The rationale for this is that it is more flexible for use cases when `Stream<Item = Result<T, Error>>`.
      
      Take for example `tokio_stream::Broadcast` then one would have to something like:
      
      ```rust
         let stream = BroadcastStream::new(rx).take_while(|r| future::ready(r.is_ok())).filter_map(|r| future::ready(r.ok()));
      ```
      
      Of course it's a bit awkward to return `Result` when the underlying stream can't fail but I think that's fair trade-off
      here.
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarTarik Gul <[email protected]>
      
      * pipe_from_stream: make E: Display instead of StdError
      
      * add a test
      
      * add `pipe_from_try_stream` API to support `TryStream`
      
      * Update tests/tests/integration_tests.rs
      
      * Update proc-macros/src/lib.rs
      
      Co-authored-by: default avatarTarik Gul <[email protected]>
      545ceaf6
  5. Mar 30, 2022
  6. Mar 29, 2022
  7. Mar 28, 2022
  8. Mar 22, 2022
  9. Mar 09, 2022
  10. Mar 02, 2022
  11. Feb 22, 2022
  12. Feb 18, 2022
  13. Feb 16, 2022
  14. Feb 11, 2022
  15. Feb 09, 2022
  16. Feb 03, 2022
  17. Feb 01, 2022
  18. Jan 31, 2022
  19. Jan 25, 2022
  20. Jan 21, 2022
  21. Jan 19, 2022
  22. Jan 10, 2022
  23. Jan 06, 2022
  24. Jan 05, 2022
    • Niklas Adolfsson's avatar
      fix(http server): handle post and option HTTP requests properly. (#637) · 6f99a038
      Niklas Adolfsson authored
      
      
      * fix(http server): handle post and option requests.
      
      * Update http-server/src/response.rs
      
      * fmt
      
      * grumbles: validate CORS before checking method kind
      
      * revert unintentional change
      
      * Add A few tests around CORS and http method/header acceptance
      
      * Tweak the CORS test
      
      * return appropriate headers for CORS preflight response
      
      * cargo fmt
      
      * jsonrpc, not jsonrpsee in test requests
      
      * don't test OPTIONS method in unsupported_methods test as it has different expectations
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Update tests/tests/integration_tests.rs
      
      * Add an example to test CORS in browser, and a couple of fixes to CORS handling
      
      * cargo fmt
      
      * Update examples/cors_server.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      6f99a038
  25. Dec 22, 2021