Skip to content

Commit

Permalink
watchdog
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Gottfried committed Feb 19, 2020
1 parent 5e2eb13 commit 9bdee9a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,22 @@ class RequestForwarder extends Object {
}
}


class WathDog extends Object {
constructor(requestForwarder) {
super();
this._clock = setInterval(this.tick.bind(this), 5000);
this.requestForwarder = requestForwarder;
}

tick() {
console.log('\n');
console.log(this.requestForwarder._activeChannels);
console.log('\n');
process
}
}

class WebSockProxyClient extends Object {

constructor(client_key) {
Expand All @@ -132,6 +148,7 @@ class WebSockProxyClient extends Object {

ws.on('open', function open() {
const request_forwarder = new RequestForwarder(ws, forward_to);
// const watchDog = new WathDog(request_forwarder);
console.log("Client connection openned.");

ws.send({data:"Hallo."});
Expand Down

0 comments on commit 9bdee9a

Please sign in to comment.