Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend NsdServiceInfo to include ipv4 and ipv6 #22

Open
Nimrodda opened this issue Nov 26, 2021 · 7 comments
Open

Extend NsdServiceInfo to include ipv4 and ipv6 #22

Nimrodda opened this issue Nov 26, 2021 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@Nimrodda
Copy link
Owner

As discussed in #19, currently hostname can be an IP address. It would be better to introduce new fields for storing ipv4 and ipv6. This affects all supported platforms (iOS, MacOS, Android and Windows).

@Nimrodda Nimrodda added the enhancement New feature or request label Nov 26, 2021
@Nimrodda Nimrodda changed the title Expand NsdServiceInfo to include ipv4 and ipv6 Extend NsdServiceInfo to include ipv4 and ipv6 Nov 26, 2021
@Nimrodda Nimrodda added this to the 1.4.0 milestone Nov 26, 2021
@casterock
Copy link

How to use 1.4.0 version? And where I can find IP. Thanks
Try changing PUBSPEC but received:
"Because mdns_prueba depends on flutter_nsd ^1.4.0 which doesn't match any versions, version solving failed."

@Nimrodda
Copy link
Owner Author

How to use 1.4.0 version? And where I can find IP. Thanks
Try changing PUBSPEC but received:
"Because mdns_prueba depends on flutter_nsd ^1.4.0 which doesn't match any versions, version solving failed."

This isn't implemented yet. 1.4.0 hasn't been released.

jnstahl added a commit to jnstahl/flutter_nsd that referenced this issue Jan 31, 2024
jnstahl added a commit to jnstahl/flutter_nsd that referenced this issue Jan 31, 2024
Nimrodda pushed a commit that referenced this issue Feb 2, 2024
@jnstahl
Copy link
Contributor

jnstahl commented Feb 2, 2024

should we close this issue and open a new one for the missing iOS implementation?

@jnstahl
Copy link
Contributor

jnstahl commented Feb 2, 2024

an iOS fix should be pretty straightforward as the NetService class also includes an array of addresses:

var addresses: [Data]?

  • Modified
    A read-only array containing NSData objects, each of which contains a socket address for the service.

However it seems that that entire class has been deprecated so an overall refresh may be needed anyways.

@Nimrodda
Copy link
Owner Author

Nimrodda commented Feb 3, 2024

yes, let's close and open a new one for iOS and MacOS 👍

@jnstahl
Copy link
Contributor

jnstahl commented Feb 3, 2024

BTW what is your opinion - I was debating with myself. Currently I return a List containing the addresses in string representation. I could also have chosen to return a List. But Strings can be easily converted to InternetAddress and vice versa. On the other hand it seemed that String was the most straightforward way to return the addresses from the platform interface. And at least for Windows there was no other option.

@Nimrodda
Copy link
Owner Author

Nimrodda commented Feb 3, 2024

BTW what is your opinion - I was debating with myself. Currently I return a List containing the addresses in string representation. I could also have chosen to return a List. But Strings can be easily converted to InternetAddress and vice versa. On the other hand it seemed that String was the most straightforward way to return the addresses from the platform interface. And at least for Windows there was no other option.

I think it was a good choice 👍

jnstahl added a commit to jnstahl/flutter_nsd that referenced this issue Feb 3, 2024
Nimrodda pushed a commit that referenced this issue Feb 4, 2024
* fix txt records returned as string instead of UInt8List

* fix key sent instead of value

* fix issue #46

* fix issue #45

* fix issue #45

* documentation update for hostAddresses

* fix issue #22 for Windows and Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants