repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unify request and response handler naming
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
WorkerBroadcastChannel.ts
diff --git
a/src/charging-station/WorkerBroadcastChannel.ts
b/src/charging-station/WorkerBroadcastChannel.ts
index d1d430c3a0c39230aef0c00dd5de5660b25e42a0..2099d695ab683e75d315151e02c9c5914eb6cedd 100644
(file)
--- a/
src/charging-station/WorkerBroadcastChannel.ts
+++ b/
src/charging-station/WorkerBroadcastChannel.ts
@@
-1,6
+1,6
@@
import { BroadcastChannel } from 'worker_threads';
import { BroadcastChannel } from 'worker_threads';
-import { BroadcastChannelRequest } from '../types/WorkerBroadcastChannel';
+import { BroadcastChannelRequest
, BroadcastChannelResponse
} from '../types/WorkerBroadcastChannel';
export default class WorkerBroadcastChannel extends BroadcastChannel {
constructor() {
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 sendRequest(request: BroadcastChannelRequest): void {
this.postMessage(request);
}
+
+ public sendResponse(response: BroadcastChannelResponse): void {
+ this.postMessage(response);
+ }
}
}