Unify request and response handler naming
[e-mobility-charging-stations-simulator.git] / src / charging-station / WorkerBroadcastChannel.ts
index d1d430c3a0c39230aef0c00dd5de5660b25e42a0..2099d695ab683e75d315151e02c9c5914eb6cedd 100644 (file)
@@ -1,6 +1,6 @@
 import { BroadcastChannel } from 'worker_threads';
 
-import { BroadcastChannelRequest } from '../types/WorkerBroadcastChannel';
+import { BroadcastChannelRequest, BroadcastChannelResponse } from '../types/WorkerBroadcastChannel';
 
 export default class WorkerBroadcastChannel extends BroadcastChannel {
   constructor() {
@@ -10,4 +10,8 @@ export default class WorkerBroadcastChannel extends BroadcastChannel {
   public sendRequest(request: BroadcastChannelRequest): void {
     this.postMessage(request);
   }
+
+  public sendResponse(response: BroadcastChannelResponse): void {
+    this.postMessage(response);
+  }
 }