PUI9 Web Sockets Component Library
This library provides the PUI9 Web Sockets component to connect/disconnect from backend.
Installation
npm install pui9-websockets
Then import and register as Vue property:
import Pui9WebSockets from 'pui9-websockets';
...
Object.defineProperty(Vue.prototype, '$puiWebSockets', { value: Pui9WebSockets });
Finally, it can be used:
this.$puiWebSockets.connect()
this.$puiWebSockets.disconnect()
this.$puiWebSockets.send(message)