Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 881 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 881 Bytes

Client for fastWS

npm Node version GitHub Action

Documents


Usage

npm i fast-ws-client

const Client = require('fast-ws-client')

const client = new Client('ws://server/fast-ws', options)

client.on('connect', () => {
  client.emit('event name', 'message')
})

client.on('event name', async () => {
  await client.emit('wait for remote', 'message', true)
})

Feature

  • Protocol version check
  • Event driven message
  • Customizable serialize
  • Awaitable event response
  • Compatible previous protocol version