aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/streams.rs
Commit message (Collapse)AuthorAgeFilesLines
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* RPC: Rename session.rs to connection.rsNick Mathewson2023-05-041-1/+1
|
* rpcserver: Fix a couple of broken rustdoc linksNick Mathewson2023-04-161-1/+2
|
* rpc: Change `id=<SYNTAX>` to "no id".Nick Mathewson2023-04-131-3/+3
| | | | | | | Now instead of hoping that buggy clients will detect a magic `id`, we can simply tell them that they will get no `id` at all. If they can't handle that case, no major harm is done: the connection will get closed anyway.
* rpc: Require that errors are RpcError.Nick Mathewson2023-04-131-1/+4
| | | | | | 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 requestsNick Mathewson2023-04-121-2/+3
| | | | | | | | | | | | | | | | 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 Mathewson2023-04-121-1/+1
| | | | | | 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.
* rpc: Switch JsonLinesEncoder to have Default, not new.Nick Mathewson2023-04-121-5/+4
|
* rpc: Rename BoxedResponseBody => ResponseBodyNick Mathewson2023-04-121-3/+3
|
* rpc: Add standard warnings to arti-rpcserverNick Mathewson2023-04-121-1/+16
|
* rpc: Add asynchronous_codec wrapper for jsonlines.Nick Mathewson2023-04-121-0/+100