| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | rpc: Require that errors are RpcError. | Nick Mathewson | 2023-04-13 | 3 | -7/+22 | |
| | | | | | | | Since we're serializing everything in this format, let's enforce it. With this change, we can no longer cram arbitrary junk into an RPC error, so we have to clean up our handling of cancelled requests. | |||||
| * | rpc: Improve error reporting for invalid requests | Nick Mathewson | 2023-04-12 | 7 | -17/+291 | |
| | | | | | | | | | | | | | | | | | 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. | |||||
| * | arti-rpcserver: Be careful about saying "result". | Nick Mathewson | 2023-04-12 | 3 | -7/+12 | |
| | | | | | | | Even though json-rpc uses "result" to mean "a successful return value from a method", we can't: Rust's `Result` type is so pervasive that confusion would be inevitable. | |||||
| * | arti-rpcserver: Rename Authentication{Method => Scheme}. | Nick Mathewson | 2023-04-12 | 1 | -7/+7 | |
| | | ||||||
| * | arti-rpcserver: rename cmd to method. | Nick Mathewson | 2023-04-12 | 1 | -2/+2 | |
| | | ||||||
| * | arti-rpcserver: rename command to method. | Nick Mathewson | 2023-04-12 | 2 | -19/+19 | |
| | | ||||||
| * | tor-rpcbase: Rename and rephrase "command" to "method" | Nick Mathewson | 2023-04-12 | 2 | -7/+7 | |
| | | ||||||
| * | Rename tor-rpccmd to tor-rpcbase. | Nick Mathewson | 2023-04-12 | 2 | -3/+3 | |
| | | ||||||
| * | rpc: Make AuthenticationMethod an enum. | Nick Mathewson | 2023-04-12 | 1 | -13/+20 | |
| | | ||||||
| * | rpc: Reify and expose DispatchTable. | Nick Mathewson | 2023-04-12 | 1 | -1/+9 | |
| | | ||||||
| * | rpc: Use Pin<Box<Stream/Sink>> for run_loop | Nick Mathewson | 2023-04-12 | 2 | -16/+24 | |
| | | ||||||
| * | rpc: Import Pin/Context/Poll. | Nick Mathewson | 2023-04-12 | 1 | -29/+13 | |
| | | | | | | (Except for one case where we are using crate::Context and task::Context at the same time.) | |||||
| * | rpc: Document our intended read-blocking behavior. | Nick Mathewson | 2023-04-12 | 1 | -0/+4 | |
| | | ||||||
| * | rpc: Switch JsonLinesEncoder to have Default, not new. | Nick Mathewson | 2023-04-12 | 2 | -6/+5 | |
| | | ||||||
| * | rpc: Rename BoxedResponseBody => ResponseBody | Nick Mathewson | 2023-04-12 | 3 | -18/+18 | |
| | | ||||||
| * | rpc: Remove anyhow dependency | Nick Mathewson | 2023-04-12 | 1 | -5/+13 | |
| | | ||||||
| * | rpc: Add standard warnings to arti-rpcserver | Nick Mathewson | 2023-04-12 | 5 | -7/+85 | |
| | | ||||||
| * | rpc: Add an authentication step. | Nick Mathewson | 2023-04-12 | 1 | -1/+70 | |
| | | | | | | | | | Per our design, every connection starts out unauthenticated, and needs one authenticate command to become authenticated. Right now the only authentication type is "This is a unix named socket where everybody who can connect has permission." | |||||
| * | RPC: add a temporary "listen" function. | Nick Mathewson | 2023-04-12 | 2 | -0/+52 | |
| | | | | | | It requires tokio, it's unix-only, and makes some unfortunate shortcuts. Probably good enough for initial testing. | |||||
| * | rpc: Declare a trivial Echo command that works on a session. | Nick Mathewson | 2023-04-12 | 1 | -1/+24 | |
| | | ||||||
| * | rpc: Wire up arti-rpcserver to use tor-rpccmd. | Nick Mathewson | 2023-04-12 | 2 | -24/+159 | |
| | | ||||||
| * | rpc: do a better job of hiding impl_const_type_id! | Nick Mathewson | 2023-04-12 | 1 | -1/+2 | |
| | | ||||||
| * | RPC: Initial implementation of a multiple-argument dispatch | Nick Mathewson | 2023-04-12 | 1 | -0/+1 | |
| | | | | | | | | | | | This code uses some kludges (discussed with Ian previously and hopefully well documented here) to get a type-identifier for each type in a const context. It then defines a macro to declare a type-erased versions of a concrete implementation functions, and register those implementations to be called later. We will probably want to tweak a bunch of this code as we move ahead. | |||||
| * | Start on a lower-level tor-rpccmd crate. | Nick Mathewson | 2023-04-12 | 1 | -35/+10 | |
| | | | | | | This crate will hold the backend pieces of RPC interaction that different parts of Arti get to implement. | |||||
| * | rpc: Add a Session object and an interaction loop. | Nick Mathewson | 2023-04-12 | 2 | -0/+184 | |
| | | ||||||
| * | rpc: Add asynchronous_codec wrapper for jsonlines. | Nick Mathewson | 2023-04-12 | 2 | -0/+101 | |
| | | ||||||
| * | rpc: Add a cancellable future type. | Nick Mathewson | 2023-04-12 | 2 | -0/+134 | |
| | | | | | | | 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 Mathewson | 2023-04-12 | 2 | -0/+222 | |
