summaryrefslogtreecommitdiff
path: root/crates/arti-client/examples/hook-tcp.rs
Commit message (Collapse)AuthorAgeFilesLines
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-121-0/+1
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* clippy: Consolidate many lints in maint/add_warningIan Jackson2022-06-241-0/+3
| | | | | | Found these by disabling the nightly dbg macro special case. Now, we have a mechanism for globally adding suppressions to tests, we can use that instead.
* clippy: Add standard test lint block to several examplesIan Jackson2022-06-241-0/+6
|
* rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-081-0/+1
| | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* Resolve the new `derive_partial_eq_without_eq` lint.Nick Mathewson2022-05-231-1/+1
| | | | It's a little overzealous sometimes, but it's mostly to the good.
* add udp to runtimetrinity-1686a2022-03-141-1/+1
|
* 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