Improve websocket reconnect robustness (#706)

Replace with stripped down NT4 client 

Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
This commit is contained in:
Matt
2023-01-06 17:25:11 -08:00
committed by GitHub
parent 8117b5814b
commit 5e977445ee
7 changed files with 109 additions and 162 deletions

View File

@@ -2,14 +2,14 @@ export const dataHandleMixin = {
methods: {
handleInput(key, value) {
let msg = this.$msgPack.encode({[key]: value});
this.$store.state.websocket.send(msg);
this.$store.state.websocket.ws.send(msg);
},
handleInputWithIndex(key, value, cameraIndex = this.$store.getters.currentCameraIndex) {
let msg = this.$msgPack.encode({
[key]: value,
["cameraIndex"]: cameraIndex,
});
this.$store.state.websocket.send(msg);
this.$store.state.websocket.ws.send(msg);
},
handleData(val) {
this.handleInput(val, this[val]);
@@ -22,7 +22,7 @@ export const dataHandleMixin = {
["cameraIndex"]: this.$store.getters.currentCameraIndex
}
});
this.$store.state.websocket.send(msg);
this.$store.state.websocket.ws.send(msg);
this.$emit('update')
},
handlePipelineUpdate(key, val) {
@@ -32,7 +32,7 @@ export const dataHandleMixin = {
["cameraIndex"]: this.$store.getters.currentCameraIndex
}
});
this.$store.state.websocket.send(msg);
this.$store.state.websocket.ws.send(msg);
this.$emit('update')
},
handleTruthyPipelineData(val) {
@@ -42,7 +42,7 @@ export const dataHandleMixin = {
["cameraIndex"]: this.$store.getters.currentCameraIndex
}
});
this.$store.state.websocket.send(msg);
this.$store.state.websocket.ws.send(msg);
this.$emit('update')
},
rollback(val, e) {