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

Method start_onprogress

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

Source from the content-addressed store, hash-verified

121 }
122
123 start_onprogress(onprogress?: (loaded: number, total: number) => void): void {
124 let total = this.ws.bufferedAmount;
125 let onprogressID = setInterval(() => {
126 let loaded = total - this.ws.bufferedAmount;
127 onprogress(loaded, total);
128 if (this.ws.bufferedAmount == 0)
129 clearInterval(onprogressID);
130 }, 200);
131 }
132
133 send_message(msg: ClientEvent, onprogress?: (loaded: number, total: number) => void): void {
134 if (this.closed())

Callers 2

send_messageMethod · 0.95
send_bufferMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected