Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@colyseus/loadtest

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colyseus/loadtest

Utility tool for load testing Colyseus.

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-5.74%
Maintainers
1
Weekly downloads
 
Created
Source

colyseus-loadtest

Utility tool for load testing Colyseus.

Usage

Install the tool globally in your system.

npm install -g colyseus-loadtest
$ colyseus-loadtest --help
colyseus-loadtest v0.1.5

Options:
    --endpoint: WebSocket endpoint for all connections (default: ws://localhost:2567)
    --room: room handler name
    --numClients: number of connections to open

Example:
    colyseus-loadtest example/bot.ts --endpoint ws://localhost:2567 --room state_handler

Scripting

You may use either JavaScript or TypeScript for scripting your connections:

  • See JavaScript template.
  • See TypeScript template.

See below the methods that are called automatically, if implemented. (They are all optional.)

requestJoinOptions (i)

Should return a plain object containing the options for client connection i to join the room provided as an argument.

onJoin ()

Triggered when the client successfully joins in the room.

onMessage (message)

Triggered when the server sends a message to this client, or broadcasts to everyone.

onStateChange (state)

Triggered when the room state changes in the server-side.

onLeave (Room)

Triggered when the client leaves the room.

onError (err)

Triggered whenever an error has occurred in the room handler.

License

MIT.

Keywords

FAQs

Package last updated on 22 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc