summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/connection
Commit message (Collapse)AuthorAgeFilesLines
* RPC: Require an Error type in methods.Nick Mathewson2024-05-161-0/+2
| | | | | | | | 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.
* Add a dead code allow in RPC codeIan Jackson2024-04-251-0/+1
|
* RPC: Remove method and object type from macros.Nick Mathewson2024-04-221-2/+2
| | | | | These are no longer needed, since they are inferred from the types of the functions.
* rpc: Move deftly attributes into an `rpc` namespace.Nick Mathewson2024-04-111-2/+2
|
* Globally rename rpc_invoke_fn to static_rpc_invoke_fnNick Mathewson2024-04-081-3/+3
| | | | | | | | This will be called _static_ to make it clear that it registers the method statically, so you don't need to install it at runtime. After a bit more work, there will be a separate macro that declares an installer function.
* Refactor: remove existence of HasConstTypeId_ as a traitNick Mathewson2024-04-081-2/+2
| | | | | | | | | We don't actually need this to be a trait; we just need methods and objects to have a `CONST_TYPE_ID_` if they want to participate in the inventory-based method registry. Removing this trait makes it much simpler to declare methods and objects.
* Port many of the macros in tor-rpcbase to use derive-deftly.Nick Mathewson2024-04-041-4/+8
| | | | | | This simplifies our implementation logic in a few places, and simplifies our invocation syntax greatly. There are a few infelicities, noted in `TODO RPC` comments.
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-1/+11
| | | | | | This will later let us tell the session-creation function how the authentication occurred, which will let it decide what privileges to provide.
* rpc: revise session initialization a lot.Nick Mathewson2023-06-151-8/+4
| | | | | | | | | | | | | | Formerly, every time we wanted to launch a new connection, we had to give the RpcMgr a TorClient. The connection would hold that TorClient until a session was authenticated, and then would wrap it in a Session and put it in the object map. Now, the RpcMgr holds a Box<dyn Fn()...> that knows how to create Sessions. When a connection is authenticated, it asks the Mgr to make it a new session. This lets us make it clearer that the TorClient simply can't be given out until the connection is authenticated. Later, it will let us create more types of Session objects under more complicated rules.
* rpc: Rename Session=>RpcSessionNick Mathewson2023-06-151-1/+1
|
* rpc: Disable auth:get_rpc_protocol for now.Nick Mathewson2023-05-241-0/+8
|
* rpc: Make the top-level returned object a "session".Nick Mathewson2023-05-241-6/+12
| | | | | | This will make it easier to change the semantics of what exactly we return, whether it has to be/contain a client, whether you can use it to look up all the live objects, &etc.
* rpc: Implement auth:query.Nick Mathewson2023-05-231-1/+39
|
* rpc: Implement the auth:get_rpc_protocol method.Nick Mathewson2023-05-231-0/+49
|
* rpc: move existing auth code to new module.Nick Mathewson2023-05-231-0/+82