web socket speed improvement and input values bugfix

This commit is contained in:
ori agranat
2019-11-30 10:39:53 -08:00
parent 5fe728751d
commit 806c8d6968
3 changed files with 14 additions and 4 deletions

View File

@@ -16,8 +16,13 @@ if (process.env.NODE_ENV === "production"){
Vue.prototype.$address = location.hostname + ":5800";
}
const url = 'ws://' + Vue.prototype.$address + '/websocket';
var ws = new WebSocket(url);
ws.binaryType = "arraybuffer";
Vue.use(VueNativeSock, 'ws://' + Vue.prototype.$address + '/websocket');
Vue.use(VueNativeSock, url,{
WebSocket: ws
});
Vue.use(VueAxios, axios);
Vue.prototype.$msgPack = msgPack(true);