| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tor-rtcompat: Rename UnsupportedStreamOps to NoOpStreamOpsHandle (fmt). | Gabriela Moldovan | 2025-01-15 | 1 | -3/+3 |
| | | |||||
| * | tor-rtcompat: Rename UnsupportedStreamOps to NoOpStreamOpsHandle. | Gabriela Moldovan | 2025-01-15 | 2 | -4/+4 |
| | | | | | | This renames UnsupportedStreamOpsHandle to NoOpStreamOpsHandle for clarity (the old name kind of sounded like the name of an error type). | ||||
| * | tor-rtcompat: Fix doc warning. | Gabriela Moldovan | 2025-01-15 | 1 | -1/+1 |
| | | |||||
| * | tor-rtcompat: Big invasive change adding StreamOps bound everywhere. | Gabriela Moldovan | 2025-01-15 | 5 | -7/+8 |
| | | | | | | | This is unfortunately necessary, because after the channel handshake, we need to give the channel reactor a `StreamOps` handle to the underlying stream. | ||||
| * | tor-rtcompat: Implement StreamOps for TLS stream types. | Gabriela Moldovan | 2025-01-15 | 2 | -1/+22 |
| | | |||||
| * | tor-rtcompat: Implement StreamOps for Framed. | Gabriela Moldovan | 2025-01-15 | 1 | -0/+13 |
| | | |||||
| * | tor-rtcompat: Implement new_handle() using TcpSockFd. | Gabriela Moldovan | 2025-01-15 | 3 | -2/+8 |
| | | |||||
| * | tor-rtcompat: Add the ability to get a StreamOps handle. | Gabriela Moldovan | 2025-01-15 | 5 | -1/+69 |
| | | | | | | | | | | | | | | | | | | | | | | | | Needed for cases where we wrap an object that implements `StreamOps` in an external type, thereby losing access to the `StreamOps` functionality. For example, during the channel handshake, we `.split()` the stream that implements `StreamOps`, which leaves us with a `SplitSink` and a `SplitStream`, neither of which implement `StreamOps`. Getting a handle to the underlying object that implements `StreamOps` (for example, a file handle) *before* the stream is `.split()` enables us to use `StreamOps` to manipulate the underlying split stream. This commit also introduces a special `UnsupportedStreamOpsHandle`, which is a type that implements `StreamOps`, but always returns an error. This type is meant to simplify error handling and usage, and is meant to be used in cases where `StreamOps` is not supported. TODO: the name of this type is pretty confusing (it's very similar to `UnsupportedStreamOp`, which is an error type), and should probably be renamed to something else (`NoOpStreamOpsHandle`, `BrokenStreamOpsHandle`, `DummyStreamOpsHandle` come to mind...). Note: this changes the `StreamOps` trait to be slightly different from what I originally envisioned in !2660 and #1769 | ||||
| * | tor-rtcompat: Note that SpawnBlocking isn't for CPU-bound tasks. | Wesley Aptekar-Cassels | 2025-01-07 | 1 | -1/+1 |
| | | |||||
| * | tor-rtcompat: Use GAT instead of RPIT in SpawnBlocking trait. | Wesley Aptekar-Cassels | 2025-01-07 | 5 | -5/+16 |
| | | | | | Due to the limitations on RPIT, it's better to use a GAT for now. | ||||
| * | tor-rtcompat: Add note about what to use spawn_blocking for. | Wesley Aptekar-Cassels | 2025-01-07 | 1 | -1/+5 |
| | | |||||
| * | tor-rtcompat: Link to spawn_blocking docs. | Wesley Aptekar-Cassels | 2025-01-07 | 1 | -0/+6 |
| | | |||||
| * | tor-rtcompat: Add spawn_blocking to Runtime trait. | Wesley Aptekar-Cassels | 2025-01-07 | 6 | -1/+67 |
| | | | | | | This adds a new SpawnBlocking trait, which exposes the spawn_blocking function that tokio, async-std, and other runtimes have. | ||||
| * | Merge branch 'mod-module-files' into 'main' | Nick Mathewson | 2025-01-07 | 1 | -0/+1 |
| |\ | | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689 | ||||
| | * | clippy: deny `mod_module_files` | Steven Engler | 2025-01-06 | 1 | -0/+1 |
| | | | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files | ||||
| * | | fix: fix typos | Dimitris Apostolou | 2025-01-06 | 1 | -1/+1 |
| |/ | |||||
| * | rtcompat: re-export items from tor_general_addr::general | Nick Mathewson | 2024-12-19 | 1 | -0/+2 |
| | | |||||
| * | streamops: Resolve unused-variable warnings. | Nick Mathewson | 2024-12-12 | 1 | -1/+1 |
| | | |||||
| * | tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp (fmt). | Gabriela Moldovan | 2024-12-10 | 3 | -5/+17 |
| | | |||||
| * | tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp. | Gabriela Moldovan | 2024-12-10 | 4 | -23/+12 |
| | | |||||
| * | tor-rtcompat: Add an error type for unsupported StreamOps. | Gabriela Moldovan | 2024-12-10 | 2 | -1/+28 |
| | | |||||
| * | tor-rtcompat: Add a default implementation for StreamOps::set_tcp_notsent_lowat. | Gabriela Moldovan | 2024-12-10 | 1 | -2/+8 |
| | | |||||
| * | tor-rtcompat: Clarify the StreamOps documentation. | Gabriela Moldovan | 2024-12-10 | 1 | -4/+6 |
| | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2660#note_3139562 | ||||
| * | tor-rtcompat: Require NetStream{Listener,Provider} streams to impl StreamOps. | Gabriela Moldovan | 2024-12-10 | 2 | -7/+5 |
| | | | | | Part of #1769 | ||||
| * | tor-rtcompat: Add tests for set_tcp_notsent_lowat. | Gabriela Moldovan | 2024-12-10 | 1 | -0/+60 |
| | | |||||
| * | tor-rtcompat: Implement StreamOps for all the stream types. | Gabriela Moldovan | 2024-12-10 | 6 | -5/+100 |
| | | | | | Part of #1769 | ||||
| * | tor-rtcompat: Add a StreamOps trait. | Gabriela Moldovan | 2024-12-10 | 2 | -1/+11 |
| | | | | | | | | | This trait will provide additional operations on `Stream`s. For now, the only supported operation is `set_tcp_notsent_lowat` (needed for #1728). Part of #1769 | ||||
| * | add_warnings, *: Allow clippy::needless_lifetimes | Nick Mathewson | 2024-12-03 | 1 | -0/+1 |
| | | | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765. | ||||
| * | Fix Windows compilation after moving unix::SocketAddr. | Nick Mathewson | 2024-10-29 | 1 | -6/+6 |
| | | |||||
| * | Remove re-export of "general::*" from tor-rtcompat. | Nick Mathewson | 2024-10-29 | 1 | -17/+15 |
| | | |||||
| * | Remove re-export of "unix" from tor_rtcompat. | Nick Mathewson | 2024-10-29 | 7 | -24/+26 |
| | | |||||
| * | Extract general::SocketAddr and its unix friends to their own crate. | Nick Mathewson | 2024-10-29 | 2 | -532/+24 |
| | | | | | This is mostly code motion. | ||||
| * | general::SocketAddr: Say "inet" rather than "tcp" | Nick Mathewson | 2024-10-17 | 1 | -35/+35 |
| | | | | | | | | | | | "inet" makes more sense, since in principle these can also be used for udp, etc. Also making a corresponding change in rpc-connect-sketch.md, which uses this format. Closes #1701. | ||||
| * | rtcompat: Fix android compilation in `general` | Nick Mathewson | 2024-10-17 | 1 | -1/+3 |
| | | | | | | | | | Previously I had assumed that `std::os::linux` also existed on android, based on the documentation of `std::os::linux::net::SocketAddrExt`. That is not, however, true. This should fix the `check-targets` CI job. | ||||
| * | rtcompat: Add a fuzzer for round-trip general::SocketAddr parsing. | Nick Mathewson | 2024-10-16 | 1 | -0/+48 |
| | | | | | (This turned up another place where we need documentation.) | ||||
| * | general::SocketAddr: Format the unnamed address as "unix:" | Nick Mathewson | 2024-10-16 | 1 | -5/+12 |
| | | | | | | This matches our parsing, and our general rule that our parser defers to SocketAddr::from_pathname. | ||||
| * | Add reverse-enginered description of Rust socketaddr formats. | Nick Mathewson | 2024-10-16 | 1 | -0/+32 |
| | | |||||
| * | general::SocketAddr: Add unit tests | Nick Mathewson | 2024-10-16 | 1 | -38/+69 |
| | | |||||
| * | general::SocketAddr: Implement PartialEq. | Nick Mathewson | 2024-10-16 | 1 | -0/+39 |
| | | | | | Needed for tests. | ||||
| * | general::SocketAddr: Specify and implement string representations. | Nick Mathewson | 2024-10-16 | 1 | -1/+285 |
| | | | | | Closes #1681. | ||||
| * | tor-rtmock: dyn_time tests: rustfmt | Ian Jackson | 2024-10-08 | 1 | -3/+1 |
| | | |||||
| * | tor-rtmock: dyn_time tests: Check DropCount on type-mismatch path | Ian Jackson | 2024-10-08 | 1 | -1/+7 |
| | | |||||
| * | tor-rtmock: dyn_time tests: Make try_downcast_string return S, not impl | Ian Jackson | 2024-10-08 | 1 | -3/+3 |
| | | | | | | This will make it possible to use on a DropCounter and get a DropCounter back. | ||||
| * | tor-rtmock: dyn_time tests: Break out try_downcast_string | Ian Jackson | 2024-10-08 | 1 | -8/+8 |
| | | |||||
| * | tor-rtmock: dyn_time tests: Rename try_downcast_dc from chk | Ian Jackson | 2024-10-08 | 1 | -2/+2 |
| | | | | | This will be clearer | ||||
| * | Merge branch 'dyn-time' into 'main' | Ian Jackson | 2024-10-01 | 8 | -3/+323 |
| |\ | | | | | | | | | Provide a type-erased SleepProvider + CoarseTimeProvider and use it for memquota queues See merge request tpo/core/arti!2460 | ||||
| | * | tor-rtcompat: dyn_time: Combine test cases into module (fmt) | Ian Jackson | 2024-10-01 | 1 | -27/+28 |
| | | | |||||
| | * | tor-rtcompat: dyn_time: Combine test cases into module | Ian Jackson | 2024-10-01 | 1 | -7/+24 |
| | | | |||||
| | * | tor-rtcompat: Test case demonstrating downcast_value doesn't drop | Ian Jackson | 2024-10-01 | 1 | -0/+25 |
| | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085583 | ||||
| | * | tor-rtcompat: Comments about the implementation of downcast_value | Ian Jackson | 2024-10-01 | 1 | -0/+18 |
| | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085582 | ||||
