MCPcopy
hub / github.com/novnc/noVNC / sQpushBytes

Method sQpushBytes

core/websock.js:206–219  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

204 }
205
206 sQpushBytes(bytes) {
207 for (let offset = 0;offset < bytes.length;) {
208 this._sQensureSpace(1);
209
210 let chunkSize = this._sQbufferSize - this._sQlen;
211 if (chunkSize > bytes.length - offset) {
212 chunkSize = bytes.length - offset;
213 }
214
215 this._sQ.set(bytes.subarray(offset, offset + chunkSize), this._sQlen);
216 this._sQlen += chunkSize;
217 offset += chunkSize;
218 }
219 }
220
221 flush() {
222 if (this._sQlen > 0 && this.readyState === 'open') {

Callers 7

sQpushStringMethod · 0.95
_negotiateStdVNCAuthMethod · 0.80
_negotiateARDAuthMethod · 0.80
clientCutTextFunction · 0.80
test.websock.jsFile · 0.80

Calls 1

_sQensureSpaceMethod · 0.95

Tested by

no test coverage detected