in nodejs/src/index.js [62:76]
function writeBytes (struct, callback, transform) {
try {
var transport = new TFramedTransport(null, function (buffer) {
// Flush puts a 4-byte header, which needs to be parsed/sliced.
transform(buffer.slice(4), callback);
});
var protocol = new TCompactProtocol(transport);
struct.write(protocol);
transport.flush();
} catch (ex) {
process.nextTick(function () {
callback(ex);
});
}
}