2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-22 23:50:35 +03:00

Update README.md

This commit is contained in:
Philip Marais
2018-09-26 07:28:03 +02:00
committed by GitHub
parent 684ddfd78d
commit 3ea1a54c77
+3
View File
@@ -67,7 +67,10 @@ Vue.use(VueNativeSock, 'ws://localhost:9090', {
connectManually: true, connectManually: true,
}) })
const vm = new Vue() const vm = new Vue()
// Connect to the websocket target specified in the configuration
vm.$connect() vm.$connect()
// Connect to an alternative websocket URI
vm.$connect('ws://localhost:9090/alternative/connection/')
// do stuff with WebSockets // do stuff with WebSockets
vm.$disconnect() vm.$disconnect()
``` ```