MCPcopy Index your code
hub / github.com/nodejs/node / writev

Function writev

lib/internal/webstreams/adapters.js:323–348  ·  view source on GitHub ↗
(chunks, callback)

Source from the content-addressed store, hash-verified

321 signal,
322
323 writev(chunks, callback) {
324 function done(error) {
325 try {
326 callback(error);
327 } catch (error) {
328 // In a next tick because this is happening within
329 // a promise context, and if there are any errors
330 // thrown we don't want those to cause an unhandled
331 // rejection. Let's just escape the promise and
332 // handle it separately.
333 process.nextTick(() => destroy(writable, error));
334 }
335 }
336
337 PromisePrototypeThen(
338 writer.ready,
339 () => {
340 return PromisePrototypeThen(
341 SafePromiseAllReturnVoid(
342 chunks,
343 (data) => writer.write(data.chunk)),
344 done,
345 done);
346 },
347 done);
348 },
349
350 write(chunk, encoding, callback) {
351 if (typeof chunk === 'string' && decodeStrings && !objectMode) {

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected