jxcore / jxm

Incredibly fast messaging backend for Node.JS / JXcore
http://jxm.io
Other
226 stars 30 forks source link

Add callback for server.start() or trigger event "start". #8

Closed cleancoderocker closed 10 years ago

cleancoderocker commented 10 years ago

At the moment as far as I understand when you call server.start() there is no way to get notified when the server is started. Is it possible to add one of the following features?

  1. add a callback function to server.start() that gets called when the server has started
  2. add an event (server.on("start")) that gets triggered when the server has started
  3. return a promise when calling server.start()
obastemur commented 10 years ago

sounds nice. Thanks. cc @ktrzeciaknubisa

ktrzeciaknubisa commented 10 years ago

@cleancoderocker Thanks for the suggestion. New event server.on("start") added with JXM.io version 2.0.9. Please remember, when the server is running in multithreaded mode this event occurs for each of the subthreads.

Source codes updated on jxm. Documentation updated on jxdocs.

cleancoderocker commented 10 years ago

Great, thanks. Works like a charm.