Giter Club home page Giter Club logo

Comments (4)

sebastianhaberey avatar sebastianhaberey commented on June 9, 2024

Hi @andreadaoud,

why would you want to call the method directly? You can just specify IpLookupType.any when calling startDiscovery. That way the discovered services will contain all their IP addresses. See also here.

from nsd.

andreadaoud avatar andreadaoud commented on June 9, 2024

Thank you for your quick response and great work!

On Apple platform we can connect to the service using xxxxx.local address. But, on Android, especially older versions, we cannot connect with .local address. My use case involves saving the xxxx.local address to config file and connect to it later. Running startDiscovery every time to get address is an option, but from my point of view, it sounds better to resolve it directly.

from nsd.

sebastianhaberey avatar sebastianhaberey commented on June 9, 2024

Ok, I get that. And is there any reason why you don't want to use dart:io's lookup method directly:

final addresses = await InternetAddress.lookup(host, type: InternetAddressType.any)

from nsd.

sebastianhaberey avatar sebastianhaberey commented on June 9, 2024

Closing this since there seems to be an easy way to do this with basic Flutter functionality. Please feel free to open another issue if this doesn't solve your issue or you're missing anything else!

from 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.