summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/stream.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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`.