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

Function callback

modules/network/net/netmdns.js:70–83  ·  view source on GitHub ↗
(message, value, address, port)

Source from the content-addressed store, hash-verified

68}
69
70function callback(message, value, address, port)
71{
72 const packet = new Parser(this.read(ArrayBuffer));
73 for (let i = 0; i < packet.answers; i++) {
74 const answer = packet.answer(i);
75 if (answer.qname.join(".") === this.host) {
76 this.client(this.host, answer.rdata);
77 break;
78 }
79 }
80
81 Timer.clear(this.timer)
82 this.close();
83}

Callers

nothing calls this directly

Calls 4

answerMethod · 0.95
readMethod · 0.65
closeMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected