(msg: ClientEvent, onprogress?: (loaded: number, total: number) => void)
| 131 | } |
| 132 | |
| 133 | send_message(msg: ClientEvent, onprogress?: (loaded: number, total: number) => void): void { |
| 134 | if (this.closed()) |
| 135 | return error_alert(t("disconnected_with_server")); |
| 136 | |
| 137 | if (this.ws === null) |
| 138 | return console.error('WebSocketWebIOSession.ws is null when invoke WebSocketWebIOSession.send_message. ' + |
| 139 | 'Please call WebSocketWebIOSession.start_session first'); |
| 140 | this.ws.send(JSON.stringify(msg)); |
| 141 | |
| 142 | if (onprogress) |
| 143 | this.start_onprogress(onprogress); |
| 144 | |
| 145 | if (this.debug) console.info('<<<', msg); |
| 146 | } |
| 147 | |
| 148 | send_buffer(data: Blob, onprogress?: (loaded: number, total: number) => void): void { |
| 149 | if (this.closed()) |
nothing calls this directly
no test coverage detected