Discover devices on local network

I’m currently trying to implement a service to discover other devices on the same network.

I’ve tried Bonjour but I’m afraid is not compatible with cordova (ios/android) so it return an error with dgram (dgram.createSocket not a function).

I found ZeroConf but it looks like only discover(watch) services registered with it (register).