Giter Club home page Giter Club logo

Comments (2)

raulk avatar raulk commented on July 21, 2024

To provide some colour on this: yamux and mplex allow unlimited streams (well, bounded by the int length of the stream index) but we're not always upgrading connections via those multiplexers.

I guess the original authors of the API go-stream-muxer API assumed that opening a stream is cheap and non-blocking. However, with transports like QUIC, where multiplexing is native, YMMV.

Ways forward

I can think of two:

  1. Change the method signature in the interface, and change the mux adaptors to conform. This implies breakage.
  2. Keep the interface intact and add a new interface, adapting the call sites to type cast and pass the context in accordingly.

I'd prefer 1 -- with gomod the impact should be limited.


Do we need to pass in a context to AcceptStream too?

from go-libp2p-core.

Stebalien avatar Stebalien commented on July 21, 2024

Do we need to pass in a context to AcceptStream too?

Probably not. AcceptStream is an analog of Listener.Accept and can be interrupted by closing the listener.

from go-libp2p-core.

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.