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

Function writeChannelMessage

lib/internal/child_process/serialization.js:78–91  ·  view source on GitHub ↗
(channel, req, message, handle)

Source from the content-addressed store, hash-verified

76 },
77
78 writeChannelMessage(channel, req, message, handle) {
79 // Pass the stable Buffer constructor so the native codec can classify Node
80 // Buffers via `value.constructor === Buffer` without reading the tamperable
81 // Buffer.prototype.constructor.
82 const serializedMessage = serialize(message, Buffer);
83
84 const result = channel.writeBuffer(req, serializedMessage, handle);
85
86 // Mirror what stream_base_commons.js does for Buffer retention.
87 if (streamBaseState[kLastWriteWasAsync])
88 req.buffer = serializedMessage;
89
90 return result;
91 },
92};
93
94const json = {

Callers 1

setupChannelFunction · 0.85

Calls 1

serializeFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…