summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/stream.rs
Commit message (Collapse)AuthorAgeFilesLines
* rpc: Have OneShotClient delegate to ClientDataStreamCtrl.Nick Mathewson2026-04-281-2/+5
| | | | | This enables the rpc client to call "arti:describe_path" and similar methods on streams constructed via this mechanism.
* Fix word duplicate typosTobias Stoeckmann2026-03-151-1/+1
|
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-1/+1
| | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* 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.
* Merge branch 'rpc_document_internal_optimism' into 'main'Nick Mathewson2025-01-301-2/+17
|\ | | | | | | | | | | | | rpc: Document what is actually going on with stream optimism. Closes #1583 See merge request tpo/core/arti!2753
| * rpc: Document what is actually going on with stream optimism.Nick Mathewson2025-01-301-2/+17
| | | | | | | | | | | | | | | | In brief: we _do_ correct implement correct optimistic vs nonoptimistic behavior for RPC streams. Only our documentation was wrong. Subsequent commits will fix our documentation more. See #1583.
* | proto: Rename (experimental) DataStream functions for ctrl accessNick Mathewson2025-01-301-1/+5
| | | | | | | | | | Since these return a client-specific type, they need a client-specific name before we can stabilize them for RPC.
* | proto: Rename DataStreamCtrl to ClientDataStreamCtrlNick Mathewson2025-01-301-5/+5
| | | | | | | | | | | | The API for this type, and the fact that it implements ClientStreamCtrl unconditionally, means that it is only for client DataStreams.
* | fix: fix typosDimitris Apostolou2025-01-301-1/+1
|/
* rpc: Clean up documenation surrounding OneshotClientNick Mathewson2025-01-151-11/+13
|
* rpc: Rename new_stream_handle to new_oneshot_client.Nick Mathewson2025-01-151-51/+43
| | | | | | | | This method doesn't actually create a new stream; it creates a single-use client object that can be used with SOCKS to launch a new stream, and capture an RPC object for that stream. Closes #1664.
* rpcserver: Wrap InvokeError as internal errorNick Mathewson2024-10-171-3/+4
| | | | | | | | | I'm about to remove HasKind from InvokeError, which would otherwise break this code. These errors are all in fact internal errors, since in this context they can only stem from incorrectly formed calls to `invoke_special_method`.
* Revise RPC documentation to be more informative.Nick Mathewson2024-10-021-4/+15
| | | | | | Previous documentation was more-or-less meant for the Arti developer only. This new documentation is intended for actual users of RPC functionality. It's meant to be extracted with `maint/rpc-doc-tool`.
* rpc: Rename SingletonId to SingleIdResponseNick Mathewson2024-09-241-3/+3
| | | | | | | | | | Calling it "singleton" might have suggested that it was using the [singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern), which it isn't. (Renaming done with rust-analyzer and double-checked with `git grep`.) Closes #1585.
* rpc: More specificity surrounding SOCKS-rpc integrationNick Mathewson2024-09-091-1/+8
|
* rpc: Refactor errors part 1: a new RpcMethod trait.Nick Mathewson2024-07-251-2/+1
| | | | | It is no longer necessary to say, for every RPC method, that its error type is RpcError.
* Un-indent a block.Nick Mathewson2024-06-111-42/+39
|
* RPC: Use RPC methods instead of the "ClientConnectionTarget" trait.Nick Mathewson2024-06-111-44/+65
| | | | | | | | | | | | On its own, this might not seem like a huge improvement, but it will later let us implement these RPC methods for types that can't reasonably implement ClientConnectionTarget. It also serves as a proof of concept that special-method invocation can actually work, so that we can build things like this in cases where introducing a trait isn't practical. Closes #1427
* rpc: Pass around our rpc::Context in an Arc.Nick Mathewson2024-06-101-2/+2
| | | | | | | | Formerly we used a Box. That was okay at first, but now that we want RPC methods to be able to invoke other RPC methods, we don't want the Invocable methods to have to consume the Context. This requires that Context become Sync.
* RPC: Require an Error type in methods.Nick Mathewson2024-05-161-0/+1
| | | | | | | | This is needed so that we can cast special methods' return types properly. I wish I could make this optional, but Rust doesn't allow defaulting an associated type.
* RPC: Use RPC method names in a consistent format.Nick Mathewson2024-05-141-1/+1
| | | | | Specifically, we want a single colon, and we want our method names to be in snake_case.
* RPC: Require DynClone for ClientConnectionError.Nick Mathewson2024-05-141-1/+1
|
* RPC: Document RpcDataSTream state transitions.Nick Mathewson2024-05-141-1/+19
|
* RPC: Rename RpcDataStream::{Waiting => Launching}Nick Mathewson2024-05-141-5/+9
| | | | Also, improve documentation.
* RPC: RpcDataStream type to act as a "stream-shaped hole"Nick Mathewson2024-05-141-0/+220
The application creates these, using a new-stream-handle RPC command, on an object that can actually create streams. Then later, the application provides the (global) identity of one of these objects when it's making a SOCKS connection. This causes the object to take hold of a `DataStreamCtrl`.