watson / ipp-printer

An IPP printer written in Node.js
MIT License
555 stars 80 forks source link

Removing/disabling printer after initialized #17

Open jesusoterogomez opened 6 years ago

jesusoterogomez commented 6 years ago

Thanks for this awesome module.

I wanted to know if there's any way to stop the printing server after it's been initialized. I am trying to create a preferences panel for my application where the user can toggle bonjour/zeroconf discovery on or off, and changing a port, or optionally disabling the printer features altogether.

If I try to initialize the printer again, I get an EADDRINUSE error. and I have tried to stop the printer by calling printer.stop or printer.server.stop, or removing the reference to the printer variable and it doesn't seem to work.

Is there any non documented API feature to accomplish this?

Thanks in advance