summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* rpc: Make the top-level returned object a "session".Nick Mathewson2023-05-241-0/+1
| | | | | | 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: Rename session.rs to connection.rsNick Mathewson2023-05-041-2/+2
|
* RPC: rename Session to Connection.Nick Mathewson2023-05-041-1/+1
| | | | | | | To me, "Session" suggests that we're authenticated, when we are not necessarily authenticated. Also, we may eventually want to have some kind of persistent session object; if we do, then we'll want Connections to be separate.
* Add a generational arena for object mapping for RPC.Nick Mathewson2023-05-041-0/+1
| | | | | | See the comments on `TypedAddr` for some explanations about why this is so tricky. Thanks to @diziet for helping me figure this out.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-3/+1
| | | | | | | | | 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.
* rpc: Make an RpcMgr type to own the DispatchTable.Nick Mathewson2023-05-041-0/+3
| | | | | | | | | In the future, this will probably hold more data as well, like a TorClient and some configuration info. The TorClient will present an issue; I've made comments about that. Closes #820
* rpc: Improve error reporting for invalid requestsNick Mathewson2023-04-121-0/+1
| | | | | | | | | | | | | | | | This is a bit big, but it's not that _complicated_. The idea here is that we use serde's "untagged" enum facility when parsing our `Request`s, such that if parsing as a `Request` fails, we parse as an `InvalidRequest` and try to report what the problem was exactly. This lets us determine the ID of a request (if it had one), so we can report that ID in our error message. We can also recover from a much broader variety of errors. We now also conform with the spec reporting errors about completely wrong json, requests without IDs, and so on.
* rpc: Add standard warnings to arti-rpcserverNick Mathewson2023-04-121-3/+35
|
* RPC: add a temporary "listen" function.Nick Mathewson2023-04-121-0/+3
| | | | | It requires tokio, it's unix-only, and makes some unfortunate shortcuts. Probably good enough for initial testing.
* rpc: Add a Session object and an interaction loop.Nick Mathewson2023-04-121-0/+1
|
* rpc: Add asynchronous_codec wrapper for jsonlines.Nick Mathewson2023-04-121-0/+1
|
* rpc: Add a cancellable future type.Nick Mathewson2023-04-121-0/+1
| | | | | | Ordinarily you can cancel a future just by dropping it, but we'll want the ability to cancel futures that we no longer own (because we gave them to a `FuturesUnordered`).
* rpc: Implement json message types for serde.Nick Mathewson2023-04-121-0/+8