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

Method close

modules/io/dnssd/dnssd.js:57–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 this.udp.add(DNSSD.IP);
56 }
57 close() {
58 while (this.services.length)
59 this.remove(this.services[0]);
60
61 while (this.monitors.length)
62 this.remove(this.monitors[0].service.slice(0, this.monitors[0].service.length - 6));
63
64 this.claims.forEach(claim => {
65 Timer.clear(claim.timer);
66 Timer.clear(claim.initial);
67 });
68 delete this.claims;
69
70 this.udp?.close();
71 delete this.udp;
72 }
73 write(buffer, address = DNSSD.IP, port = DNSSD.PORT) {
74 try {
75 this.udp.write(buffer, address, port);

Callers

nothing calls this directly

Calls 4

removeMethod · 0.95
sliceMethod · 0.65
closeMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected