voodootikigod/node-serialport — pull request #217 by programmarchy (2013-09-18 22:29:36+00:00)
Title: Add drain method to wait until output is transmitted

Uses tcdrain on unix. On win, has same action as flush.

This can be useful to know when data has "left the pipe". The windows mapping is not as clean. FlushFileBuffers is more analogous to tcdrain, rather than tcflush.