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

Method close

examples/io/tcp/httpclient/httpclient.js:183–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 });
182 }
183 close() {
184 this.#socket?.close();
185 this.#socket = undefined;
186 Timer.clear(this.#timer);
187 this.#timer = undefined;
188 this.#current = undefined;
189 this.#requests.length = 0;
190 this.#state = "closed";
191 }
192 request(options) {
193 options = {...options};
194 this.#requests.push(options);

Callers 1

#errorMethod · 0.95

Calls 2

closeMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected