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

zeroconf.publishService not working !! #188

Open
YoucefBen47 opened this issue Sep 7, 2024 · 2 comments
Open

zeroconf.publishService not working !! #188

YoucefBen47 opened this issue Sep 7, 2024 · 2 comments

Comments

@YoucefBen47
Copy link

Testing on react-native 0.73.6 and 0.75.1 we have followed the steps mention in the docs.

import Zeroconf from 'react-native-zeroconf';

const zeroconf = new Zeroconf();

useEffect(() => {
    zeroconf.publishService(
      '_myservice._tcp',
      'tcp',
      'local.',
      'MyService',
      8004,
      {},
    );
    
  }, []);

We used Discovery browser and Bonjour browser and seems like the service is not being published.

@ayasunclover
Copy link

had the same issue. The service type should be 'myservice' instead of '_myservice._tcp' (without underscores and the protocol); then, publishService works.

@YoucefBen47
Copy link
Author

had the same issue. The service type should be 'myservice' instead of '_myservice._tcp' (without underscores and the protocol); then, publishService works.

Thank you it works after trying your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants