2.0.0 • Published 1 year ago
@chipsgg/openservice-ws-client v2.0.0
Openservice Websocket Client
Websocket client for openservice-ws-server.
Install
yarn add @chipsgg/openservice-ws-client
Geting Started
import Client from "@chipsgg/openservice-ws-client";
//websockets must be supported in browser
const WS = require("ws");
const channels = ["public", "private", "auth", "community"];
Client(WS, { channels }).then(async ({ state, actions }) => {
// do somthing
await actions.public('echo', { message: 'hello world!' })
.then(console.log)
.catch(console.error)
await actions.community('on', { topic: 'chats', path: ['public'] })
state.on('community.chats.public', console.log)
})
2.0.0
1 year ago
1.0.34
3 years ago
1.0.19
3 years ago
2.1.2
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.25
3 years ago
1.0.24
3 years ago
2.1.0
4 years ago
1.0.23
3 years ago
1.0.29
3 years ago
1.0.28
3 years ago
3.2.0
3 years ago
1.0.27
3 years ago
3.1.0
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
1.0.33
3 years ago
1.0.32
3 years ago
1.0.31
3 years ago
1.0.30
3 years ago
2.0.13
4 years ago
2.0.12
4 years ago
2.0.11
4 years ago
2.0.10
4 years ago
2.0.9
4 years ago
2.0.8
4 years ago
2.0.7
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago