aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpc-client-core/src/conn/connimpl.rs
Commit message (Collapse)AuthorAgeFilesLines
* rpc: tweak documentation and variable names wrt renamingNick Mathewson2026-03-251-31/+36
| | | | | | | Since we renamed PollingStream and NonblockingStream to BlockingConnection and NonblockingConnection, it no longer makes sense to refer to them as streams, or put them in variables called "stream".
* rpc: Rename nb_stream.rs → ll_conn.rsNick Mathewson2026-03-251-4/+4
| | | | | Since we are no longer calling these types "streams" I've decided to revert to the old name for this module.
* rpc: Rename NonblockingStream → NonblockingConnection.Nick Mathewson2026-03-251-2/+2
|
* rpc: Rename PollingStream → BlockingConnection.Nick Mathewson2026-03-251-12/+12
|
* Fix typosTobias Stoeckmann2026-03-241-1/+1
| | | | Typos found with codespell
* rpc: add ffi wrappers for nonblocking and event-loop functions.Nick Mathewson2026-03-231-3/+0
| | | | | This commit adds FFI wrappers for the "poll" API, which lets the user integrate with a poll(2)-style event loop.
* Fix word duplicate typosTobias Stoeckmann2026-03-151-2/+2
|
* rpc: Transpose Results in RpcPoll::poll.Nick Mathewson2026-03-051-7/+5
|
* rpc: document when try_as_{fd,socket} can fail.Nick Mathewson2026-03-051-1/+11
|
* rpc: Usage documentation for polling APIIan Jackson2026-03-051-11/+24
|
* rpc: Propose to transpose a Result<Result<>>Ian Jackson2026-03-051-0/+2
|
* rpc: Add a question in the form of a TODOIan Jackson2026-03-051-0/+2
|
* rpc: Fix many long lines in docs and commentsIan Jackson2026-03-051-8/+16
|
* rpc: Remove WantIo and expose wants_to_write().Nick Mathewson2026-03-051-0/+7
|
* rpc: Change Waker implementation to EventLoop.Nick Mathewson2026-03-051-7/+13
| | | | | | | | | | | Per discussion, it makes more sense to have the API be one that gets called when our IO interests change. Additionally, this commit removes the try_reading and try_writing booleans, as previously discussed. I've left a couple of XXXX comments where more documentation or thought is likely needed.
* rpc: API for event-driven IO.Nick Mathewson2026-03-051-1/+104
| | | | | | | This API provides the necessary functionality to use an RpcConn inside a poll-like event loop. This is part of #1856.
* RPC: Raname Tag,RequestTag to UserTag.Nick Mathewson2026-03-051-30/+26
|
* rpc: documentation fixes and clarificationsNick Mathewson2026-02-261-3/+8
| | | (from Diziet)
* rpc: Add a paragraph to the connimpl overviewNick Mathewson2026-02-261-0/+3
|
* rpc: Add overview documentation to connimpl.Nick Mathewson2026-02-261-0/+64
| | | | This is based on a pad with input from nickm and Diziet
* rpc: Nonblocking request submit API (Rust only)Nick Mathewson2026-02-261-3/+25
| | | | | | | | | | | This commit finally adds a `RpcConn::submit()` method to send a request without having to wait on it specifically, and an `RpcConn::wait()` method to wait for the next response from _any_ such request. Thanks to the previous patches, this is relatively simple! This is part of #1856.
* rpc: Backend support for pollable requests.Nick Mathewson2026-02-261-5/+75
| | | | | | In order to implement tagged pollable requests, we need a separate response queue for them, and we need to dispatch requests to that queue as appropriate.
* rpc: Add "Tag"s to response queues.Nick Mathewson2026-02-261-25/+49
| | | | | | | For pollable requests, we'll want to associate each one with a tag. But we'd rather not carry tags around for _every_ pending request: it would waste space and lead to possible errors. So instead we add a Tag type as a member of QueueId.
* rpc: Refactor connimpl in preparation for pollable requests.Nick Mathewson2026-02-261-59/+181
| | | | | | | | | | | | | | | | | | | | | In order to implement this part of #1856, we will internally divide requests into two kinds: "Waitable" and "Pollable". Waitable requests are the kind that we have now: They are created with an "execute" method. They each have their own response queue and their own condvar, and in order to see if they have any responses, the caller needs to call some kind of request-specific method. Pollable requests are the ones we will add. They are created with a "submit" method, and associated with a user-provided tag. They all share the same queue and the same condvar. To see if any of them have a response, the caller will run a function that returns tagged responses. In order to support this division, this commit: - turns `RequestState` into an enum, - makes `ResponseQueue` into its own type, - Adds a trait that will be implemented by every type that can identify a response queue.
* RPC: Fix documentation about "readers".Nick Mathewson2026-02-041-10/+12
|
* rpc: Replace llconn backend with nb_stream backend.Nick Mathewson2026-02-041-39/+31
| | | | All the tests still pass!
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* fix `clippy::doc_overindented_list_items`Steven Engler2025-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | Example: ```text warning: doc list item overindented --> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9 | 322 | /// indicates that no more messages will be received for this request. | ^^^ help: try using ` ` (2 spaces) | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items note: the lint level is defined here --> crates/arti-rpc-client-core/src/lib.rs:8:9 | 8 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]` ```
* fix: fix typosDimitris Apostolou2025-01-061-1/+1
|
* rpclib: Rename RequestCancelled to be accurate.Nick Mathewson2024-10-211-2/+2
|
* rpclib, ffi: Allow simultaneous calls to `arti_rpc_handle_wait()`Nick Mathewson2024-08-271-1/+1
| | | | | | | | | | | | | | Its underlying function previously took `&mut RpcHandle`, which was an accident waiting to happen. Now it takes `&RpcHandle` and includes a Mutex to prevent multiple threads from waiting for updates on the same request ID at once. As an alternative, we *could* try to update connimpl::Receiver to allow multiple simultaneous listeners on the same request ID. But that would (I think) require a lot more bookkeeping, and thus would be a bit more error-prone. Closes #1532.
* rpclib: Refactor request canonicalizationNick Mathewson2024-08-071-7/+3
| | | | | | This lets us make a couple of types module-private, and prepares the way for using the serde_json::Value trick on requests too.
* RPC: Fix rustdoc links.Nick Mathewson2024-07-161-1/+1
|
* rpc client: Documentation.Nick Mathewson2024-07-161-0/+5
|
* rpc client: resolve unused-foo warnings.Nick Mathewson2024-07-161-1/+1
|
* Add a TODO about refactoring should_alertNick Mathewson2024-07-161-0/+5
|
* Rename CmdError to ProtoError.Nick Mathewson2024-07-161-12/+12
|
* RPC: Implement connection negotiation.Nick Mathewson2024-07-161-1/+6
|
* WIP: Lower and middle levels of Arti rpc core.Nick Mathewson2024-07-161-0/+463