summaryrefslogtreecommitdiff
path: root/tor-proto/src/stream
Commit message (Collapse)AuthorAgeFilesLines
* Add tor-proto docs and tweak docs+apis elsewhere.Nick Mathewson2021-05-211-0/+6
|
* Resolve clippy warnings from Rust 1.52.Nick Mathewson2021-05-071-1/+1
| | | | | | | | | | Rust 1.52 just came out, and there are new clippy lints to deal with: * It spots more cases when we could use Option::map * It spots more cases when we could use Iterator::flatten * When we build a struct instance, it wants us to list the fields in the same order that the struct declares them.
* Remove pin_project usage in tor-proto.Nick Mathewson2021-04-281-41/+37
| | | | Turns out we didn't need it.
* cargo fix --edition-idiomsNick Mathewson2021-04-261-7/+7
|
* Better management for END cells in streams.Nick Mathewson2021-03-103-11/+12
|
* Box the buffer in DataWriterImpl.Nick Mathewson2021-03-101-3/+2
|
* Remove now-unused methods from DataStream and its allies.Nick Mathewson2021-03-101-36/+0
|
* Treat StreamClosed as indicating no error.Nick Mathewson2021-03-101-3/+7
| | | | This is wrong, but less wrong than the other way around.
* Use AsyncRead and AsyncWrite in our proxy implementationNick Mathewson2021-03-101-0/+2
|
* Make DataStream implement AsyncRead and AsyncWrite.Nick Mathewson2021-03-101-1/+27
|
* Implement AsyncWrite for DataWriter.Nick Mathewson2021-03-101-24/+155
|
* Revise DataReader to implement AsyncRead.Nick Mathewson2021-03-101-23/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | The tricks I needed here turned out to be: * I needed to store the future returned by read_cell() while it is returning Poll::Pending. * Since the type of that future is secret, I needed to put it in a Box<dyn Future>. * But since that future holds a reference to the DataReader, that would create a self-referential structure if we tried to store the DataReader and the future at the same time. So instead, I had to make an enum() that either holds a DataReader directly, or holds the future that will give us back the DataReader when it's done. (I also had to change the read_cell() function so that it takes ownership of the DataReader, and returns it when it's finished.) (Daniel Franke explained how to do this.) * Finally, I couldn't figure out how to change the enum's type in-place, so I had to wrap it in an Option<>. (Daniel Franke says this isn't actually necessary.) I've noted a couple of places in the read code where I want to handle errors and closes more carefully.
* Rearrange DataStream code a bit and add an internal layer of indirectionNick Mathewson2021-03-101-36/+56
|
* Make note_ended private on RawCellStream.Nick Mathewson2021-03-102-8/+18
|
* Move DataStream into its own module.Nick Mathewson2021-03-101-0/+210
|
* Move ResolveStream to its own module.Nick Mathewson2021-03-101-0/+39
|
* Move RawCellStream into its own module.Nick Mathewson2021-03-101-0/+101