constructor(parent, address) {
		super();

		this.address = address;
		this.port = SERVER_PORT;

		// Bind a custom function instead of using directly to skip resolving debug before id is set
		this.debug = function() { parent.debug.apply(parent, arguments); };

		this.socket = dgram.createSocket({
			type: 'udp4',
			reuseAddr: true
		});

		this.socket.on('message', this._onMessage.bind(this));
		this.socket.on('listening', () => {
			// Add membership to the multicast addresss for all network interfaces
			const interfaces = os.networkInterfaces();
			for(const name of Object.keys(interfaces)) {
				const addresses = interfaces[name];

				for(const addr of addresses) {
					if(addr.family === 'IPv4') {
						this.socket.addMembership(MULTICAST_ADDRESS, addr.address);
					}
				}
			}

			// Broadcast a whois to find all gateways
			const json = JSON.stringify({
				cmd: 'whois'
			});
			this.debug('DEV BROADCAST ->', json);
			this.socket.send(json, 0, json.length, MULTICAST_PORT, MULTICAST_ADDRESS);

			// Give us one second to discover the gateway
			setTimeout(() => {
				this.debug('DEV <- Timeout for whois');
				this.emit('ready');
			}, 1000);
		});
		this.socket.bind({
			port: SERVER_PORT,
			exclusive: true
		});
	}
Local Developer API for the gateway. Used to read data from the gateway
and connected devices.

TODO: Retries for discovery