segmentio/nsq.js — pull request #38 by gjohnson (2014-09-02 22:37:52+00:00)
Title: Add callback to writer close

I'm relying on [net.Socket's close event](http://nodejs.org/api/net.html#net_event_close_1) to ensure all IO is flushed rather than keeping count of messages PUB-ed that have not received a response yet. Should be good enough...

NOTE: this does not add a callback to Connection#destroy because destroying implies you don't care about outgoing data.