Update:Cleanup socket usage & add func for emitting events to admin users

This commit is contained in:
advplyr 2022-11-24 16:35:26 -06:00
parent e2af33e136
commit 180293ebc1
7 changed files with 90 additions and 105 deletions

View file

@ -342,6 +342,7 @@ export default {
this.$root.socket = this.socket
console.log('Socket initialized')
// Pre-defined socket events
this.socket.on('connect', this.connect)
this.socket.on('connect_error', this.connectError)
this.socket.on('disconnect', this.disconnect)
@ -350,6 +351,7 @@ export default {
this.socket.io.on('reconnect_error', this.reconnectError)
this.socket.io.on('reconnect_failed', this.reconnectFailed)
// Event received after authorizing socket
this.socket.on('init', this.init)
// Stream Listeners