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

'networkInterface' event #50

Merged
merged 2 commits into from
Oct 4, 2021
Merged

Conversation

richardschneider
Copy link
Contributor

I'm doing a peer-2-peer app and want to discover other peers when a new network interface is discovered. This PR emits a 'networkInterface' event.

Also, I found some weirdness on Windows when the laptop sleeps and then wakes up. So a couple of socket calls are wrapped in a try/catch.

@mafintosh Again, thanks for this library!

@richardschneider
Copy link
Contributor Author

@mafintosh any comment?

@daviddias
Copy link

@richardschneider can you add tests for these changes?

@mafintosh
Copy link
Owner

@richardschneider sorry for the delay. this looks good to me. are the try catches and membership drops necessary?

@richardschneider
Copy link
Contributor Author

I found some weirdness on Windows when the laptop sleeps and then wakes up. So a couple of socket calls are wrapped in a try/catch.

@drahnieR
Copy link

drahnieR commented May 6, 2020

I was just trying do a PR for try/catch on socket.setMulticastInterface. This will be something I want as well.
@mafintosh are we going to merge this or another PR is preferred?

@mafintosh
Copy link
Owner

@drahnieR are you seeing errors without the try/catch ?

@drahnieR
Copy link

drahnieR commented May 7, 2020

@mafintosh yes, this is what i got. I'm using https://github.com/watson/bonjour btw

Error: setMulticastInterface EADDRNOTAVAIL
    at Socket.setMulticastInterface (dgram.js:800:11)
    at EventEmitter.that.update (/home/pi/.node_modules/node_modules/multicast-dns/index.js:142:12)
    at Socket.<anonymous> (/home/pi/.node_modules/node_modules/multicast-dns/index.js:55:12)
    at Socket.emit (events.js:215:7)
    at startListening (dgram.js:148:10)
    at dgram.js:328:7
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at listOnTimeout (internal/timers.js:501:9)
    at processTimers (internal/timers.js:475:7)

@alxhotel
Copy link

Hey @mafintosh, can you merge this. I think the try-catch will help.

@DiegoRBaquero
Copy link

@mafintosh can we get maintainer access for this package as well, similarly to chromecasts?

@mafintosh
Copy link
Owner

Thanks for the patience (and ping @alxhotel). Releasing now

@mafintosh
Copy link
Owner

7.2.4

@alxhotel
Copy link

alxhotel commented Oct 4, 2021

Thanks @mafintosh ! 😄

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

Successfully merging this pull request may close these issues.

None yet

6 participants