You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
'use strict'
|
|
|
|
const SonicBoom = require('..')
|
|
|
|
const out = new SonicBoom(process.stdout.fd)
|
|
const str = Buffer.alloc(1000).fill('a').toString()
|
|
|
|
let i = 0
|
|
|
|
function write () {
|
|
if (i++ === 10) {
|
|
return
|
|
}
|
|
|
|
if (out.write(str)) {
|
|
write()
|
|
} else {
|
|
out.once('drain', write)
|
|
}
|
|
}
|
|
|
|
write()
|