aboutsummaryrefslogtreecommitdiff
path: root/crates/arti/src/rpc.rs
Commit message (Collapse)AuthorAgeFilesLines
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-1/+1
| | | | | | 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-7/+8
| | | | | | | | | | | | | | 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 new_session to new_connectionNick Mathewson2023-06-151-1/+1
|
* rpc: revise the relationship between Mgr and ConnectionNick Mathewson2023-06-141-1/+1
| | | | | | | | This adds a Weak reference from Connection to Mgr, makes DispatchTable mutable, and makes a few other changes as discussed between me and Diziet the other week. I bet we are not done tweaking this, but I hope it's a setp forwards.
* RPC: tell the `arti` SOCKS code about an RpcMgr object.Nick Mathewson2023-06-051-7/+29
| | | | | It will use this to find which TorClient to use when opening a stream.
* rpc: Move Arc::new() to RpcMgr code.Nick Mathewson2023-06-051-2/+2
|
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-041-2/+2
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-0/+55
Now there's a module in `arti` that runs the loop for an RPC listener. The part of the old `listener` module that made the framed connections is now part of the `Session` object. There is now yet another a temporary location for the pipe; we should pick something better. At least now it's configurable.