nodejitsu/haibu — pull request #106 by renedx (2012-05-05 22:58:17+00:00)
Title: Capture multiple ports

Currently Haibu-carapace is able to find multiple ports, but Haibu itself doesn't do anything with it. It would be handy if it does, because this way you can inform the user, log it or open these ports in firewalls dynamic too.

It is common to use one port for a full Application, but I got a rare case where multiple listeners are created for different situations in a single process, it was there for kinda strange Haibu reacted with a single port.

The attached code is my current implementation. I'm still not sure about the little timeout, but nextTick wasn't a solution in this case.