MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / send_buffer

Method send_buffer

webiojs/src/session.ts:148–162  ·  view source on GitHub ↗
(data: Blob, onprogress?: (loaded: number, total: number) => void)

Source from the content-addressed store, hash-verified

146 }
147
148 send_buffer(data: Blob, onprogress?: (loaded: number, total: number) => void): void {
149 if (this.closed())
150 return error_alert(t("disconnected_with_server"));
151
152 if (this.ws === null)
153 return console.error('WebSocketWebIOSession.ws is null when invoke WebSocketWebIOSession.send_message. ' +
154 'Please call WebSocketWebIOSession.start_session first');
155
156 this.ws.send(data);
157
158 if (onprogress)
159 this.start_onprogress(onprogress);
160
161 if (this.debug) console.info('<<< Blob data...');
162 }
163
164 close_session(): void {
165 this._closed = true;

Callers

nothing calls this directly

Calls 5

closedMethod · 0.95
start_onprogressMethod · 0.95
error_alertFunction · 0.90
tFunction · 0.90
sendMethod · 0.80

Tested by

no test coverage detected