1. 12 Jul, 2021 1 commit
    • David's avatar
      Rexport types for servers (#409) · 0592442e
      David authored
      * 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
      0592442e
  2. 10 Jul, 2021 1 commit
    • David's avatar
      Pass OwnedRpcParams to async methods (#410) · d5d67e98
      David authored
      
      
      * Pass OwnedRpcParams to async methods
      
      * Cow-ified RpcParams
      
      * fmt
      
      * Separate `RpcParamsSequence` parser from `RpcParams`
      
      * Remove OwnedId, use Id<'static> instead
      
      * Ensure that parsed `Id` is borrowing from input slice
      
      * Tweak/add some docs
      Test that parse() works after calling sequence()
      
      * Fix rustdoc link
      
      Co-authored-by: default avatarMaciej Hirsz <hello@maciej.codes>
      d5d67e98
  3. 08 Jul, 2021 1 commit
  4. 01 Jul, 2021 3 commits
    • Igor Aleksanov's avatar
      New proc macro (#387) · ddb50806
      Igor Aleksanov authored
      
      
      * Start working on the new proc macro system
      
      * Add skeleton for rendering
      
      * Improve error reporting
      
      * Main part of 'render_client'
      
      * Implement RPC client generation
      
      * Client successfully rendered
      
      * Add doc-comment generation for the API client
      
      * Check that all the methods have receiver
      
      * Start working on the server impl
      
      * Add helper method to find server crate
      
      * Fix usage of client rpc path
      
      * Decent progress on the server macro implementation
      
      * Server macro compiled successfully
      
      * Remove unneeded re-export
      
      * Insert SubscriptionSink argument to the subscription server signatures
      
      * Add basic doc-comment for the macro
      
      * no_run -> ignore
      
      * Trait with subscription compiles
      
      * Extend the example
      
      * Add integration test for client/server impl
      
      * Add trybuild setup
      
      * Set correct span for attribute parsing related errors
      
      * Add basic set of trybuild tests
      
      * Add tests for client and server generated separately
      
      * Improve proc-macro documentation
      
      * Update proc-macros/src/lib.rs
      
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      
      * Fix a couple of bugs in docs
      
      * Fix rendering subscription with params
      
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      ddb50806
    • Maciej Hirsz's avatar
      Streaming RpcParams parsing (#401) · 095db9b2
      Maciej Hirsz authored
      * Streaming RpcParams parsing
      
      * DRY RpcParams::one again
      
      * Fix doc comments
      095db9b2
    • Maciej Hirsz's avatar
      Set allowed Host header values (#399) · f705e325
      Maciej Hirsz authored
      
      
      * Set allowed Host header values
      
      * Error if allowed hosts list is empty
      
      * Grammar
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      f705e325
  5. 30 Jun, 2021 2 commits
    • Maciej Hirsz's avatar
      Synchronization-less async connections in ws-server (#388) · 7496afe2
      Maciej Hirsz authored
      * WIP
      
      * More WIP
      
      * Simplify ConnDriver
      
      * Progress all connections on each poll
      
      * Make ConnDriver more opaque and less leaky
      
      * fmt
      
      * Spawn connections on tasks after handshake
      
      * WIP put connections on tasks
      
      * cargo fmt, naming clarity
      
      * Fix grumbles
      
      * Extra comment on swap_remove
      
      * Remove unwrap from the handshake
      
      * Restore the wrapping_add on connection id
      7496afe2
    • Niklas Adolfsson's avatar
      [ws server]: terminate already established connection(s) when the server is stopped (#396) · 7a33bf50
      Niklas Adolfsson authored
      
      
      * [ws server]: terminate connection when closed.
      
      * fix tests
      
      * add test
      
      * address grumbles: return Ok when server stopped
      
      * revert log
      
      * revert outdated documentation
      
      * use wrapping add for conn id
      
      * address grumbles: replace Mutex with AtomicBool
      
      * add comment to assertion
      
      * fix nits
      
      * address grumbles: naming of variables
      
      * address grumbles: RwLock to wait for tasks
      
      This commit introduces a RwLock instead of the Mutex to the shared by the background tasks
      and the stop handle won't signal until all readers has been dropped.
      
      * fix nit
      
      * Update ws-server/src/server.rs
      
      * remove AtomicBool; use stop_sender instead
      
      * Update ws-server/src/server.rs
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * correct subscription err messages
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      7a33bf50
  6. 29 Jun, 2021 1 commit
  7. 25 Jun, 2021 1 commit
    • Niklas Adolfsson's avatar
      [ci]: test each individual crate's manifest (#392) · 2ca8355a
      Niklas Adolfsson authored
      * [ci]: test each crate outside workspace
      
      We have bitten by these a few times now with that some features are leaked from the workspace
      which makes it compile in the workspace but not using it's own Cargo.toml.
      
      * [ci]: add tests for macos and windows
      
      * add missed `WsServer` and `HttpServer`
      
      * [ws server]: fix features
      
      * debug failure in CI
      
      * remove platform dependent assertion
      
      * fix nit; proc-macros is proc-macros
      
      * restore removed assertion
      
      * remove whitespaces
      2ca8355a
  8. 24 Jun, 2021 2 commits
  9. 23 Jun, 2021 1 commit
  10. 18 Jun, 2021 2 commits
    • Maciej Hirsz's avatar
      Cross-origin protection (#375) · 26b06136
      Maciej Hirsz authored
      * Initial implementation
      
      * Comments
      
      * Send a 403 on denied origin
      
      * Noodling around with `set_allowed_origins`
      
      * Error on empty list
      
      * Soketto 0.6
      
      * fmt
      
      * Add `Builder::allow_all_origins`, clarify doc comments
      
      * Rename Cors -> AllowedOrigins, nits, no panic
      26b06136
    • Maciej Hirsz's avatar
      Method aliases + RpcModule: Clone (#383) · 6c69a8c0
      Maciej Hirsz authored
      
      
      * Make sync methods into Arc pointers
      
      * impl Clone for RpcModule and Methods
      
      * No need to wrap Methods in Arc anymore
      
      * Simplify generics
      
      * register_alias
      
      * fmt
      
      * grammar
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      
      * Use a separate Arc counter for tracking max_connections
      
      Co-authored-by: James Wilson's avatarJames Wilson <james@jsdw.me>
      6c69a8c0
  11. 16 Jun, 2021 1 commit
  12. 14 Jun, 2021 1 commit
  13. 10 Jun, 2021 1 commit
  14. 08 Jun, 2021 1 commit
  15. 07 Jun, 2021 1 commit
  16. 04 Jun, 2021 4 commits
    • David's avatar
      Add missing `rt` feature (#369) · 3f804de1
      David authored
      * Add missing `rt` feature
      
      * Use rt-multi-thread actually
      
      * More feature flag foo
      v0.2.0
      3f804de1
    • David's avatar
      Release prep for v0.2 (#368) · b3a0748b
      David authored
      * Release prep
      
      * Mention proc macro limitations
      
      * Mention publish script
      b3a0748b
    • Niklas Adolfsson's avatar
      chore(scripts): publish script (#354) · a3feec75
      Niklas Adolfsson authored
      * chore(scripts): publish script
      
      * use script from jsonrpc
      a3feec75
    • Niklas Adolfsson's avatar
      [rpc module]: server-side close subscription (#355) · b987b811
      Niklas Adolfsson authored
      
      
      * [rpc module]: server-side close subscription
      
      Add functionality that closes the subscription after the sink has been dropped.
      
      * [integration tests]: add timeout on futures
      
      * remove global subscriber mutex
      
      * fix nit
      
      * [client types]: fix #349
      
      Subscription::next() propogate error when parsing the response fails
      
      * [client types]: fix #349
      
      Subscription::next() propogate error when parsing the response fails
      
      * unify subscription and notification
      
      * rename again
      
      * send notif response when subscription is dropped
      
      * stray debug stuff
      
      * Update utils/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * Revert "[client types]: fix #349"
      
      This reverts commit c4fefade719ebd8c964a62d0eb16f89db3346ccd.
      
      * Revert "[integration tests]: add timeout on futures"
      
      This reverts commit 21dfb99649aaaa8c847a693b4510e0202498fa2c.
      
      * show that actual edge-case
      
      * fix nit
      
      * Update types/src/traits.rs
      
      * fix bad merge
      
      * ugly; but works
      
      * complete solution
      
      * get rid of Option
      
      * Update tests/tests/integration_tests.rs
      
      * Update utils/src/server/rpc_module.rs
      
      * Update utils/src/server/rpc_module.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * grumbles: fix faulty early return
      
      * remove weird abstraction KeepAlive
      
      * fix nits
      
      * revert test timeouts
      
      * address grumbles
      
      * fix build
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      b987b811
  17. 03 Jun, 2021 3 commits
    • Niklas Adolfsson's avatar
      [ws client]: fix propogate error in subscription response (#356) · ccc07c79
      Niklas Adolfsson authored
      
      
      * [client types]: fix #349
      
      Subscription::next() propogate error when parsing the response fails
      
      * unify subscription and notification
      
      * rename again
      
      * Update types/src/traits.rs
      
      * fix bad merge
      
      * Update types/src/client.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * grumbles: subscribe_method -> subscribe_to_method
      
      * Update tests/tests/integration_tests.rs
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      
      * grumbles: doc links
      
      Co-authored-by: David's avatarDavid <dvdplm@gmail.com>
      ccc07c79
    • 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
    • Igor Aleksanov's avatar
      Stick code to a single runtime (#364) · e34e28f2
      Igor Aleksanov authored
      
      
      * Stick test code to a single runtime
      
      * Replace async-std in ws-client with tokio
      
      * Replace std::thread::sleep with tokio::time::sleep in test
      
      * Add compatibility layer for tokio v0.2
      
      * Add check for both features being enabled + some improvements
      
      * Update ws-client/src/tokio.rs
      
      Co-authored-by: Niklas Adolfsson's avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      e34e28f2
  18. 02 Jun, 2021 4 commits
  19. 01 Jun, 2021 3 commits
  20. 31 May, 2021 2 commits
  21. 28 May, 2021 2 commits
  22. 27 May, 2021 2 commits