Skip to content

Commit 28af4a1

Browse files
added websocket send on connection
1 parent c1cb92f commit 28af4a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/charts/bar-chart-stats.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ export default {
162162
this.$options.sockets.onerror = function(event) {
163163
console.log(event)
164164
}
165+
166+
let vm = this
167+
168+
this.$options.sockets.onopen = function(event) {
169+
vm.$options.sockets.send(JSON.stringify({"type": "MY_METADATA"}))
170+
}
171+
165172
}
166173
},
167174
mounted() {

0 commit comments

Comments
 (0)