MCPcopy Create free account
hub / github.com/deepclause/agentvm / readFromNetwork

Method readFromNetwork

src/network.js:277–284  ·  view source on GitHub ↗
(maxLen)

Source from the content-addressed store, hash-verified

275
276 // Called when VM wants to read data from the network interface
277 readFromNetwork(maxLen) {
278 if (this.txBuffer.length === 0) return null;
279
280 const chunk = this.txBuffer.subarray(0, maxLen);
281 this.txBuffer = this.txBuffer.subarray(chunk.length);
282
283 return chunk;
284 }
285
286 /**
287 * Get the current size of pending data in the TX buffer

Callers 2

stack.test.jsFile · 0.80
startFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected