(x, fn)
| 244 | } |
| 245 | |
| 246 | function write(x, fn) { |
| 247 | chunk = chunk ? Buffer.concat([chunk, x]) : Buffer.from(x) |
| 248 | if (fn || chunk.length >= 1024) |
| 249 | return nextWrite(fn) |
| 250 | nextWriteTimer === null && (nextWriteTimer = setImmediate(nextWrite)) |
| 251 | return true |
| 252 | } |
| 253 | |
| 254 | function nextWrite(fn) { |
| 255 | const x = socket.write(chunk, fn) |
no test coverage detected