aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-client/examples/hook-tcp.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti-client: use PreferredRuntime by default, doc cleanupseta2022-02-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | This makes using the `PreferredRuntime` the first-class option inside `arti-client`, freeing users who don't want to think about runtimes from having to do so. `TorClient::create_unbootstrapped` and `builder` now automatically use this runtime, leaving only `builder_custom` for users who wish to manually specify a runtime. This lets us clean up the docs a lot: mentions of using custom runtimes are now relegated to nearer the end of the crate-level documentation, and we mostly just link to `tor_rtcompat`'s docs to explain more there. Instead, we take some more time to explain how you use the builder API to create clients synchronously. Other doc cleanups included getting rid of the explanation of `TorAddr` in the main crate-level doc; this is already well-documented elsewhere, and is something users should discover organically later. fixes arti#326
* use runtime TlsProvider in tcp-hook exampletrinity-1686a2022-02-251-2/+1
|
* Fix typosDimitris Apostolou2022-02-231-3/+3
|
* add one more comment to hook-tcptrinity-1686a2022-02-231-0/+1
|
* examples/hook-tcp: add some comments, rework lifetimes a biteta2022-02-231-28/+73
| | | | | | Try to make the `hook-tcp` example a bit easier to read by adding/changing comments, and renaming the lifetimes for `async_trait`-generated trait methods.
* implement correct handling of connection close and add comment explaining ↵trinity-1686a2022-02-231-9/+54
| | | | goal of the example
* add drop on CustomTcpStream to catch disconnection without closetrinity-1686a2022-02-231-0/+13
|
* add example of tcp hooktrinity-1686a2022-02-231-0/+235
this required to make additional types public