mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-23 07:30:35 +03:00
Update README.md
This commit is contained in:
@@ -61,6 +61,18 @@ Vue.use(VueNativeSock, 'ws://localhost:9090', {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Manage connection manually:
|
||||||
|
|
||||||
|
``` js
|
||||||
|
Vue.use(VueNativeSock, 'ws://localhost:9090', {
|
||||||
|
connectManually: true,
|
||||||
|
})
|
||||||
|
const vm = new Vue()
|
||||||
|
vm.$connect()
|
||||||
|
// do stuff with WebSockets
|
||||||
|
vm.$disconnect()
|
||||||
|
```
|
||||||
|
|
||||||
#### On Vuejs instance usage
|
#### On Vuejs instance usage
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
|
|||||||
Reference in New Issue
Block a user