summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/stream
Commit message (Collapse)AuthorAgeFilesLines
* proto: Remove unfinished sentence from docsGabriela Moldovan2026-02-161-2/+0
|
* proto: Update IncomingStreamRequestFilter docsGabriela Moldovan2026-02-161-2/+3
| | | | | The `CircHopSyncView` is now the view of a hop, not of the whole circuit.
* proto: Rename CircSyncView to CircHopSyncViewGabriela Moldovan2026-02-161-2/+2
| | | | And update the docs
* Apply 1 suggestion(s) to 1 file(s)Nick Mathewson2026-01-271-1/+1
| | | Co-authored-by: carti-it <[email protected]>
* tor-proto: Report CircuitClosed on unexpected stream rx closeNick Mathewson2026-01-221-6/+4
| | | | | | | | | | | | | | | | As near as I can tell, there are only three ways that the sender corresponding to this rx can be dropped: - `StreamMap::terminate` because the stream object itself was dropped. (But see #2323.) - `StreamMap::close_stream` because an END message or similar has been received. (But see #2322.) - The `StreamMap` has been dropped. The first two cases are already handled, and AFAICT the third can only happen when the circuit hop closes. That makes `CircuitClosed` the appropriate error here, not `StreamProto`. Part of a fix for #2304.
* proto: Fix docs post-refactoringGabriela Moldovan2026-01-131-2/+2
|
* proto: Dedupe IncomingStreamRequestHandlerGabriela Moldovan2026-01-121-1/+26
|
* proto: Fix a number of newly broken doc linksGabriela Moldovan2025-11-241-1/+1
|
* proto: Adjust docs to refer to the new location of StreamReceiverGabriela Moldovan2025-11-241-1/+1
| | | | | | While we still re-export StreamReceiver from the client module, I want to avoid importing it from there in the implementation-agnostic modules, just to make it clearer we're not using client-specific types.
* proto: Move StreamComponents to top-level stream modGabriela Moldovan2025-11-241-2/+1
|
* proto: Move raw under top-level stream modGabriela Moldovan2025-11-241-0/+164
|
* proto: Move StreamTarget to stream moduleGabriela Moldovan2025-11-241-1/+1
|
* proto: Move StreamReqInfo to stream moduleGabriela Moldovan2025-11-241-1/+50
|
* proto: Move IncomingStream* types to shared moduleGabriela Moldovan2025-11-241-1/+295
|
* proto: Adjust a comment about a buffer size.Nick Mathewson2025-10-281-3/+3
|
* proto: Move dumb pipes to top-lvl stream moduleGabriela Moldovan2025-10-211-0/+256
|
* proto: Rename data cmd checkers to {Inbound,Outbound}DataCmdCheckerGabriela Moldovan2025-10-161-3/+3
| | | | | | The previous "incoming" terminology was rather ambiguous. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3348#note_3275337
* proto: Move IncomingDataCmdChecker to top-level stream module.Gabriela Moldovan2025-10-161-0/+51
| | | | | | | This will be used by relays too (for validating incoming messages on streams). This is just code motion, so it's best reviewed with `--color-moved`.
* proto: Move cmdchecker under top-level stream module.Gabriela Moldovan2025-10-161-0/+55
| | | | | The CmdChecker will be used by relays too, so I am moving it to the shared `stream` module.
* tor-proto: update unit testSteven Engler2025-10-141-27/+24
|
* tor-proto: relax XON limitsSteven Engler2025-10-141-3/+13
|
* tor-proto: remove `StreamEndpointType`Steven Engler2025-10-142-23/+6
|
* tor-proto: relax XOFF limitsSteven Engler2025-10-141-22/+30
|
* tor-proto: add derives for `CellCount`Steven Engler2025-10-141-1/+1
|
* proto: Fix flow control docs post-move.Gabriela Moldovan2025-10-071-2/+2
| | | | | | | | | | `StreamFlowCtrl` is no longer accessible via `tor_proto::client`, so I had to update one of the (doc) imports with its new path Also, I had to change a couple of imports to use `DataWriter` and `DataStream` from `crate::client::stream` instead of `crate::client::stream::data`, because the latter is not visible from `flow_ctrl` anymore.
* proto: Move flow_ctrl module under stream (fmt).Gabriela Moldovan2025-10-071-1/+1
|
* proto: Move flow_ctrl module under stream.Gabriela Moldovan2025-10-078-0/+1064
| | | | This will be used by exits too, so I am moving it out of `client`.
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-1810-2731/+0
| | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* proto: Rename the `tunnel` module to `client` (fmt).Gabriela Moldovan2025-08-183-3/+3
|
* proto: Rename the `tunnel` module to `client`.Gabriela Moldovan2025-08-187-9/+9
| | | | | | The implementation from `tunnel` is client-specific, so we are renaming the module accordingly. The more generic parts will be pulled into a separate module in a future commit.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-073-5/+5
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* tor-proto: make stream recv queues unbounded if "flowctl-cc" enabledSteven Engler2025-08-051-7/+27
|
* conflux: Adjust docs and fix doc links.Gabriela Moldovan2025-08-051-1/+1
|
* proto: Move ClientCirc stream functions to ClientTunnelDavid Goulet2025-08-053-15/+9
| | | | | | | | | | | | | In order to pull this off, some client => tunnel renaming needed to happen including the comments. The send_raw_msg() is an experimental and expert mode method that any tunnel should have access to in order to be able to send whatever message in whatever tunnel type. No behavior changes. Signed-off-by: David Goulet <[email protected]>
* tor-basic-utils: add `assert_val_impl_trait!` macroSteven Engler2025-07-171-2/+5
|
* tor-proto: replace `DataReader`Steven Engler2025-07-172-44/+48
| | | | | | | | | | | | `DataReader` -> `DataReaderInner` `DataReaderNew` -> `DataReader` This means that the `DataReader` now supports XON/XOFF flow control using the `XonXoffReader`. This means that it can receive requests for a new drain rate from the reactor, and can send the new drain rate to the reactor once there is no more stream data queued.
* tor-proto: add `DataReaderNew`Steven Engler2025-07-173-5/+75
| | | | This will later become `DataReader`.
* tor-proto: add `StreamReceiver::is_empty()`Steven Engler2025-07-171-1/+39
|
* tor-proto: add the `XonXoffReader` and connect it to the reactorSteven Engler2025-07-174-3/+191
| | | | | | | | | | | | The idea here is that the reactor builds an `XonXoffReaderCtrl` for the new stream, and the `XonXoffReaderCtrl` can receive notifications from the reactor's `StreamFlowControl`. The `XonXoffReaderCtrl` can be combined with any `AsyncRead` to build a `XonXoffReader`, essentially wrapping the `AsyncRead` with a type that handles XON/XOFF flow control. Essentially, the reactor gives you a type that allows you to add XON/XOFF flow control support to any `AsyncRead`. We will add this `XonXoffReader` to the `DataReader` in a future commit.
* tor-proto: add plumbing for sending XONSteven Engler2025-07-171-1/+34
| | | | | Nothing actually causes an XON to be sent yet. But this adds the code so that anything holding the `StreamTarget` can request to send an XON.
* tor-cell: add `FlowCtrlVersion::V0`Steven Engler2025-07-161-12/+2
|
* tor-proto: send XOFF messages when the queue grows too largeSteven Engler2025-07-162-4/+65
|
* tor-proto: add dedicated types for the incoming stream queueSteven Engler2025-07-163-2/+245
| | | | | XON/XOFF flow control will want to know how many data bytes are queued on a stream, so the new types track that.
* tor-proto: combine some objects into a `StreamComponents`Steven Engler2025-07-151-23/+16
| | | | | | As we continue adding more functionality to streams like flow control, we'll have more objects to pass around. This tries to group them together.
* tor-proto: rename `StreamSendFlowControl` and related changesSteven Engler2025-07-151-20/+20
| | | | | | | | The plan is to use `StreamSendFlowControl` (now `StreamFlowControl`) for both outgoing and incoming directions, so a name change is needed. This also updates some comments, and renames some related struct fields that have the word "send" in them.
* tor-cell: remove `flowctl-cc` feature and make XON/XOFF cells stableSteven Engler2025-07-151-1/+0
| | | | | I don't see any further changes being needed for these types, and it simplifies a lot of future code in tor-proto that uses these types.
* Merge branch 'flow-ctrl' into 'main'opara2025-07-103-57/+200
|\ | | | | | | | | tor-proto: Handle incoming XON/XOFF messages See merge request tpo/core/arti!3054
| * tor-proto: renamed `get_bytes_per_sec()` to `bytes_per_sec()`Steven Engler2025-07-102-2/+2
| |
| * tor-proto: set `XonXoffBased` variant behind "flowctl-cc" featSteven Engler2025-07-071-0/+8
| |
| * tor-proto: finish support for `StreamSendFlowControl` XON/XOFFSteven Engler2025-07-071-7/+4
| |