let requestPayload: RequestPayload;
let responsePayload: ResponsePayload;
try {
- [messageId, command, requestPayload] = this.dataValidation(request);
+ [messageId, command, requestPayload] = this.requestValidation(request);
if (this.requestHandlers.has(command) === false) {
throw new BaseError(
// Validate the raw data received from the WebSocket
// TODO: should probably be moved to the ws verify clients callback
- private dataValidation(rawData: RawData): ProtocolRequest {
+ private requestValidation(rawData: RawData): ProtocolRequest {
// logger.debug(
// `${this.uiServer.logPrefix(
// moduleName,
this._responseHandlers = new Map<string, ResponseHandler>();
- this._ws.onmessage = this.handleResponse.bind(this);
+ this._ws.onmessage = this.responseHandler.bind(this);
}
public static get instance() {
);
}
- private handleResponse(messageEvent: MessageEvent<string>): void {
+ private responseHandler(messageEvent: MessageEvent<string>): void {
const data = JSON.parse(messageEvent.data) as ProtocolResponse;
if (Utils.isIterable(data) === false) {