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

Method remove

modules/network/dns/dnsresolverudp.js:60–72  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

58 }
59 }
60 remove(request) {
61 for (let i = 0; i < this.requests.length; i++) {
62 if (this.requests[i].request === request) {
63 this.requests.splice(i, 1);
64 break;
65 }
66 }
67 if (!this.requests.length) {
68 manager = null;
69 this.socket.close();
70 Timer.clear(this.timer);
71 }
72 }
73 send(request) {
74 const packet = new Serializer({query: true, recursionDesired: true, opcode: DNS.OPCODE.QUERY, id: request.id});
75 packet.add(DNS.SECTION.QUESTION, request.host, DNS.RR.A, DNS.CLASS.IN);

Callers 2

callbackMethod · 0.95
taskMethod · 0.95

Calls 2

closeMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected