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

Method constructor

modules/network/dns/dnsresolverudp.js:45–48  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

43 socket = new Socket({kind: "UDP"});
44
45 constructor(options) {
46 this.socket.callback = this.callback.bind(this);
47 this.timer = Timer.repeat(this.task.bind(this), 1000);
48 }
49 add(request) {
50 request.state = 0;
51 request.id = request.host.endsWith(".local") ? 0 : ((Math.random() * 65535) | 1);

Callers

nothing calls this directly

Calls 2

repeatMethod · 0.80
bindMethod · 0.45

Tested by

no test coverage detected