Skip to content

Latest commit

 

History

History

client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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