+ public sendResponse(response: ProtocolResponse): void {
+ // TODO: send response only to the client that sent the request
+ this.broadcastToClients(JSON.stringify(response));
+ }
+
+ public logPrefix(modName?: string, methodName?: string, prefixSuffix?: string): string {
+ const logMsgPrefix = prefixSuffix
+ ? `UI WebSocket Server ${prefixSuffix}`
+ : 'UI WebSocket Server';
+ const logMsg =
+ modName && methodName ? ` ${logMsgPrefix} | ${modName}.${methodName}:` : ` ${logMsgPrefix} |`;
+ return Utils.logPrefix(logMsg);