aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpc-client-core/src/conn
Commit message (Collapse)AuthorAgeFilesLines
* multiple crates: Fix clippy warningshjrgrn2026-07-101-1/+1
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* 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-252-7/+7
| | | | | 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-252-14/+14
|
* Fix typosTobias Stoeckmann2026-03-242-2/+2
| | | | 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.
* Merge branch 'typos' into 'main'opara2026-03-161-2/+2
|\ | | | | | | | | Fix various typos See merge request tpo/core/arti!3781
| * Fix word duplicate typosTobias Stoeckmann2026-03-151-2/+2
| |
* | rpc-client: add support to prefer/require su permissionNick Mathewson2026-03-161-2/+56
|/
* Merge branch 'nonblocking-rpc-part3' into 'main'Nick Mathewson2026-03-052-65/+551
|\ | | | | | | | | rpc: API for event-driven IO. See merge request tpo/core/arti!3652
| * 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-052-13/+31
| |
| * 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-052-9/+18
| |
| * rpc: Remove WantIo and expose wants_to_write().Nick Mathewson2026-03-051-0/+7
| |
| * rpc: Change Waker implementation to EventLoop.Nick Mathewson2026-03-052-16/+19
| | | | | | | | | | | | | | | | | | | | | | 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-052-2/+133
| | | | | | | | | | | | | | 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.
* | Add missing #[cfg(unix)] in arti-rpc-client-core to fix Windows build.Alexander Hansen Færøy2026-02-281-0/+1
|/
* RPC: Fix documentation about "readers".Nick Mathewson2026-02-041-10/+12
|
* rpc: Replace llconn backend with nb_stream backend.Nick Mathewson2026-02-042-64/+51
| | | | All the tests still pass!
* rpc: Move responsibility for wrapping streams to rpc-client-coreNick Mathewson2026-02-041-6/+19
| | | | | This will be necessary since, in order to make the RPC stuff nonblocking, we'll need a better API than just `Box<dyn Read>` etc.
* rpc-client-core: Add missing CookieBeginReply docsGabriela Moldovan2025-12-011-0/+1
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-074-8/+8
| | | | | | | | | | | | | | 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)]` ```
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* rpclib: Obey error Display convention wrt sources.Nick Mathewson2025-02-041-3/+3
| | | | | | | In general, we try to obey the convention that an error's Display method does not display that error's sources. Part of #1650.
* fix: fix typosDimitris Apostolou2025-01-301-2/+2
|
* rpclib: Rename ConnPtSource to ConnPtOrigin.Nick Mathewson2025-01-291-11/+11
|
* rpclib: Rename WithinDir.{expanded => file}.Nick Mathewson2025-01-291-3/+6
|
* rpclib: Move from_env_string_elt onto SearchLocation.Nick Mathewson2025-01-291-4/+6
|
* rpclib: Implement accessors for ConnectFailureNick Mathewson2025-01-291-1/+1
|
* rpclib: Implement Display for ConnPtDescriptionNick Mathewson2025-01-291-4/+51
|
* rpclib: New combined error type for RPC connect failures.Nick Mathewson2025-01-291-9/+25
| | | | | This type explains where every error came from, and explains why each declined connect point was declined.
* rpclib: Pipe connect-point locations through our loading process.Nick Mathewson2025-01-291-22/+77
|
* rpclib: Keep track of where each SearchEntry comes from.Nick Mathewson2025-01-291-24/+91
| | | | Subsequent commits will pipe this information forward to our errors.
* arti-rpc-client-core: Rename Authentication{Rejected=>Failed}Nick Mathewson2025-01-231-3/+3
| | | | | | | | Also change corresponding message. This way, it will be clear that we're just reporting that Arti gave us an error—not that the error necessarily means that the authentication itself was "wrong".
* rpclib: Avoid overuse of execute_internal_ok.Nick Mathewson2025-01-232-18/+36
| | | | | | | | | | | The execute_internal_ok method converts every error response into an internal error; as such, it's only appropriate when there is no way for a well-behaved Arti instance to give an error response. But we had been using it in a few places where errors were possible under other circumstances. This commit fixes that behavior, and adds documentation to help avoid it.