Git Product home page Git Product logo

Comments (4)

quininer avatar quininer commented on August 19, 2024

poll_write calls the underlying poll_write every time.

I don't think this is correct, it only calls poll_write when it satisfies wants_write.

from tls.

david-monroe avatar david-monroe commented on August 19, 2024

My interpretation was that wants_write returns true always if there is something to write at all.

    pub fn wants_write(&self) -> bool {
        !self.sendable_tls.is_empty()
    }

from tls.

quininer avatar quininer commented on August 19, 2024

You seem to be right. given that rustls has a flush method, this seems to be a reserved behavior for rustls.

There are two buffer in write direction, one is sendable_plaintext before send and one is sendable_tls after send.
The sendable_plaintext is equivalent to BufWriter<TlsStream<TcpStream>>, and sendable_tls is equivalent to TlsStream<BufWriter<TcpStream>>.

Does rustls have any plan to expose write buffer? @ctz @djc

from tls.

djc avatar djc commented on August 19, 2024

We have a plan to have an unbuffered/write-through API, where rustls doesn't maintain any buffers for the data path. I've made some progress on this over the past year, but the next step is non-trivial to implement.

from tls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.