(data: Blob, onprogress?: (loaded: number, total: number) => void)
| 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; |
nothing calls this directly
no test coverage detected