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

Method parseTcpData

src/ringbuffer.js:376–381  ·  view source on GitHub ↗

* Parse TCP data message * @param {Buffer} payload * @returns {Object} - { key, data }

(payload)

Source from the content-addressed store, hash-verified

374 * @returns {Object} - { key, data }
375 */
376 parseTcpData(payload) {
377 const keyLen = payload[0];
378 const key = payload.slice(1, 1 + keyLen).toString('utf8');
379 const data = payload.slice(1 + keyLen);
380 return { key, data };
381 }
382
383 /**
384 * Parse key-only message (connected, end, close)

Callers 1

pollNetResponsesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected