Comments (4)
It looks like all you need is a reader that caches the bytes read, which doesn't need to be in tokio-rustls, you can put it in your own crate.
from tokio-rustls.
@quininer can you describe a bit more how that would work? From what I understand of how the LazyConfigAcceptor works, once accept
has returned here I'm not able to get the raw IO stream back (via take_io
), which means it's not possible with the existing API to get back the raw IO stream while also having access to the ClientHello.
Maybe I could pass a RefCell into the LazyConfigAcceptor though... that could work as a one-off solution. But is this not a use-case the crate would want to support in a cleaner way?
from tokio-rustls.
@mediocregopher see tokio-rs/tls#144 (comment)
We can access &mut IO
via Accept
, but it would be nice to provide an into_inner
to StartHandshake
as well.
from tokio-rustls.
Thanks, that makes sense. I've made a new branch with that change here: https://code.betamike.com/micropelago/tokio-rustls/commit/3d462a1d97836cdb0600f0bc69c5e3b3310f6d8c
and moved all the rest of the AsyncRead wrapping code into my application.
from tokio-rustls.
Related Issues (20)
- README and examples use unavailable API HOT 7
- Version tags HOT 6
- tokio-rustls write only first IoSlice when use write_vectored HOT 1
- Override `poll_write_vectored`? HOT 5
- Allow non-static lifetime for ServerName? HOT 3
- I can't find OwnedTrustAnchor??????
- Error: tls handshake eof HOT 1
- How to get peer certificates as server? HOT 2
- Error `NotConnected` when serving a `TlsStream<TcpStream>` when using `hyper` HOT 4
- Error: badRecordMac HOT 2
- Sending plaintext response for non-TLS connection attempts HOT 8
- Large percentage of cpu time in memset when reading with a larger buffer HOT 9
- Proposal: Share code between tokio-rustls and futures-rustls HOT 1
- Use Unbuffered API
- 0.5-RTT support
- Remove TCP shutdown
- Secure WebSocket Implementation with tokio-tungstenite | tokio-rustls | rustls-platform-verifier HOT 2
- Detailed Error Messages HOT 1
- Test failure in common::test_stream::stream_handshake_regression_issues_77 HOT 2
- does TLSAcceptor read early data? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokio-rustls.