apaprocki / node-dhcpjs

dhcpjs provides native DHCP support in Node.js
MIT License
61 stars 21 forks source link

Emitting 'error' on parsing failure #21

Closed Massi78 closed 7 years ago

Massi78 commented 7 years ago

In order to handle with dhcp parsing errors would be useful to set up something like:

    var server = dhcpjs.createServer();

    server.on('listening', onListening);
    server.on('message', handleMessage);
    server.on('error', handleError);
    server.bind();

I'm proposing a patch to emit the 'error' event in those cases