MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / attach

Method attach

modules/network/websocket/websocket.js:316–323  ·  view source on GitHub ↗
(socket)

Source from the content-addressed store, hash-verified

314 this.#listener = undefined;
315 }
316 attach(socket) {
317 const request = addClient(socket, 2, this.callback);
318 request.timer = Timer.set(() => {
319 delete request.timer;
320 request.callback(Server.connect, this); // tell app we have a new connection
321 socket.callback(2, socket.read());
322 });
323 }
324};
325
326function addClient(socket, state, callback) {

Callers

nothing calls this directly

Calls 4

addClientFunction · 0.85
setMethod · 0.65
readMethod · 0.65
callbackMethod · 0.45

Tested by

no test coverage detected