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

Function makeSyncWrite

lib/internal/net.js:65–81  ·  view source on GitHub ↗
(fd)

Source from the content-addressed store, hash-verified

63}
64
65function makeSyncWrite(fd) {
66 return function(chunk, enc, cb) {
67 if (enc !== 'buffer')
68 chunk = Buffer.from(chunk, enc);
69
70 this._handle.bytesWritten += chunk.length;
71
72 const ctx = {};
73 writeBuffer(fd, chunk, 0, chunk.length, null, undefined, ctx);
74 if (ctx.errno !== undefined) {
75 const ex = new UVException(ctx);
76 ex.errno = ctx.errno;
77 return cb(ex);
78 }
79 cb();
80 };
81}
82
83/**
84 * https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml

Callers 1

SocketFunction · 0.85

Calls 3

writeBufferFunction · 0.50
cbFunction · 0.50
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…