MCPcopy
hub / github.com/Doorman11991/smallcode / encodeMessage

Function encodeMessage

src/lsp/client.js:13–16  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

11
12// LSP message framing
13function encodeMessage(msg) {
14 const content = JSON.stringify(msg);
15 return `Content-Length: ${Buffer.byteLength(content)}\r\n\r\n${content}`;
16}
17
18function decodeMessages(buffer) {
19 const messages = [];

Callers 2

_requestMethod · 0.85
_notifyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected