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

Method #onWritable

examples/io/tcp/tlssocket/tlssocket.js:131–137  ·  view source on GitHub ↗
(count)

Source from the content-addressed store, hash-verified

129 return this.#format ? "buffer" : "number";
130 }
131 #onWritable(count) {
132 this.#socket.writable = count;
133 if (!this.#ready)
134 this.#messageHandler();
135 else if (count > 96) // 96 is an estimate of TLS overhead
136 this.#callbacks.onWritable?.(count - 96);
137 }
138 #onReadable(count) {
139 this.#socket.readable = count;
140 if (this.#data)

Callers 2

constructorMethod · 0.95
#messageHandlerMethod · 0.95

Calls 2

#messageHandlerMethod · 0.95
onWritableMethod · 0.65

Tested by

no test coverage detected