mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-08 06:32:27 +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
|
||||
|
||||
``` js
|
||||
|
||||
Reference in New Issue
Block a user