Giter Site home page Giter Site logo

Contexts on HTTP calls about goupnp HOT 6 CLOSED

JulianKnodt avatar JulianKnodt commented on July 23, 2024
Contexts on HTTP calls

from goupnp.

Comments (6)

huin avatar huin commented on July 23, 2024 1

I think the actions still need to use the context inside of the http call by attaching it to the request, but it's good as an entry point!

Ah, that should be in 6145404, which I submitted prior.

from goupnp.

JulianKnodt avatar JulianKnodt commented on July 23, 2024 1

ahhhh cool cool then it should be good from my pov!

from goupnp.

huin avatar huin commented on July 23, 2024

Short answer: yes, this library really should use contexts, and not just in the SOAP calls.

This is something that I started thinking about doing a while back, and there was some work I did on the v2 branch to do that and other things. For one reason or another, I never completed that work, and since then various fixes and changes have merged into master.

There's a lot of things I'd do differently in this package if I were to redesign them, but they'd almost all be breaking changes. It would likely be best to do such breaking changes in bulk on a separate v2 package to avoid breaking existing users.

If this package branched out to a v2, it'd be good to know which things need doing, not just contexts. IPv6 is one thing, although I know basically zero about how multicast/UPnP works with IPv6. There's also other breaking API changes I'd likely make, which would probably make substantial differences to how the SOAP APIs are defined.

I need to ponder that a bit, but would be interested in your thoughts and others on that.

from goupnp.

JulianKnodt avatar JulianKnodt commented on July 23, 2024

Hm, I'm not particularly experienced in releasing packages and maintaining compatibility for older versions.
What I think would be best would probably be having a numbered version as you suggest, and seems to be recommended by the golang team. One thing for a v2 might be to release a non major version, and expect breaking changes such as adding IPv6 or others before reaching a completed v2. I suspect that trying to do everything in bulk would probably take way too long and lead to the package not being completed, as is the case when there is feature creep.

One other approach patching existing clients might be to make it so that a UPnP client could patch in a context for the next call... but that seems really hacky and not ideal. But that's just a random idea.

from goupnp.

huin avatar huin commented on July 23, 2024

So hopefully commit 5a0d4bd fixes your current needs. I've made some start on a v2, but as you note it will likely take a while for the limited free time I spend on goupnp. Let me know if this change doesn't work well for you.

from goupnp.

JulianKnodt avatar JulianKnodt commented on July 23, 2024

I think the actions still need to use the context inside of the http call by attaching it to the request, but it's good as an entry point!

from goupnp.

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.