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

Function doWrite

lib/internal/streams/writable.js:587–600  ·  view source on GitHub ↗
(stream, state, writev, len, chunk, encoding, cb)

Source from the content-addressed store, hash-verified

585}
586
587function doWrite(stream, state, writev, len, chunk, encoding, cb) {
588 state.writelen = len;
589 if (cb !== nop) {
590 state.writecb = cb;
591 }
592 state[kState] |= kWriting | kSync | kExpectWriteCb;
593 if ((state[kState] & kDestroyed) !== 0)
594 state.onwrite(new ERR_STREAM_DESTROYED('write'));
595 else if (writev)
596 stream._writev(chunk, state.onwrite);
597 else
598 stream._write(chunk, encoding, state.onwrite);
599 state[kState] &= ~kSync;
600}
601
602function onwriteError(stream, state, er, cb) {
603 --state.pendingcb;

Callers 1

clearBufferFunction · 0.70

Calls 2

_writevMethod · 0.45
_writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…