update
Took 1 hour 17 minutes
This commit is contained in:
@ -28,6 +28,7 @@ export class WebSocketHandler {
|
||||
try {
|
||||
if (this.ws && this.ws.readyState == 1) {
|
||||
log("Sending " + payload.event);
|
||||
|
||||
await this.ws.send(payload.toString());
|
||||
resolve();
|
||||
}
|
||||
@ -38,7 +39,8 @@ export class WebSocketHandler {
|
||||
}
|
||||
|
||||
public static answerRequest(type: RequestType, content: any) {
|
||||
WebSocketHandler.send(new WebSocketPayload(WebSocketEvent.RESPONSE, {type: type, content: content}));
|
||||
|
||||
WebSocketHandler.send(new WebSocketPayload(WebSocketEvent.RESPONSE, {type: type, data: content}));
|
||||
log("Answered " + type + " request");
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user