Code Monkey home page Code Monkey logo

Comments (5)

jnstahl avatar jnstahl commented on June 1, 2024

At the core, MDNS sends a broadcast out, in essence "who supports _http._tcp." and all the devices who do will send a reply.
The only way to tell if a service has gone away is to continuously broadcast, keep a database of known responses and then compare if a service that was there before no longer responds.

For iOS and Android, this is something the OS keeps track of internally, presumably the OS will periodically broadcast regardless if any query is open, and the API only allows you to get a notification of the internal database.

Emulating the same behavior on windows would probably be excessive, as here the broadcasting is done by the app directly, not by the OS. And, it would also be non-trivial to keep track of things as possibly not each device will respond every single time, so one would have to have an algorithm tracking additions and removals.

from flutter_nsd.

jnstahl avatar jnstahl commented on June 1, 2024

I guess it all depends on what the use case is here. If an app wants to monitor what is available in the network continuously, the removal notification is essential. I would think that most apps will use the flutter_nsd package just to connect to something (lets say a printer), then be done with it. At least that is how I use it.

from flutter_nsd.

Nimrodda avatar Nimrodda commented on June 1, 2024

Yeah, it's the same use case I have. In my case I don't even list the available devices if there's only one, but just connect to it directly. I came up with this after addressing #27. I realized we have the API in place, but it's actually not used 😅
I see you already created a PR for this. Great stuff! Thanks once again for such swift action 💪

from flutter_nsd.

jnstahl avatar jnstahl commented on June 1, 2024

why is this issue re-opened? any issues with my fix?

from flutter_nsd.

Nimrodda avatar Nimrodda commented on June 1, 2024

I don't remember. Probably a mistake.

from flutter_nsd.

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.