Log ws messages

This commit is contained in:
Pierre HUBERT 2020-04-01 14:30:04 +02:00
parent 6f4e543876
commit 6eaea7cc1e

View File

@ -143,6 +143,7 @@ class UserWebSocket {
const req_id = "r-"+reqCounter++; const req_id = "r-"+reqCounter++;
// Send the message // Send the message
console.info("WS request", req_id, title, data);
this.ws.send(JSON.stringify(new WsMessage({ this.ws.send(JSON.stringify(new WsMessage({
id: req_id, id: req_id,
title: title, title: title,
@ -166,6 +167,8 @@ class UserWebSocket {
*/ */
static async ProcessMessage(msg) { static async ProcessMessage(msg) {
console.info("WS remote message", msg);
// Check if the message is not associated if any request // Check if the message is not associated if any request
if(!msg.hasId) if(!msg.hasId)
this.ProcessDetachedMessage(msg) this.ProcessDetachedMessage(msg)