Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Simple Node.js tool to test WebSocket connections. Supports two servers: the public echo server (wss://echo.websocket.org) and Twitch chat. Functional but marked as an abandoned project.

License

Notifications You must be signed in to change notification settings

LNMedia/websocket-tester-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebSocket Test Server

This is a simple WebSocket test server designed for testing connections and latency.

How it works:

  • The tester can connect to either the Twitch IRC WebSocket server or a custom WebSocket server (for example, an echo test server).
  • The server to test can be chosen by passing an argument when running the script (default: "custom").
  • Once connected, the tester will send 5 test PINGs to the chosen server:
    • For Custom servers: sends a PING message and waits for the PONG response to measure RTT (Round-Trip Time).
    • For Twitch: sends a PING :tmi.twitch.tv and measures the time until the PONG response is received from the Twitch server.

Logging:

  • All sent and received messages, including timestamps and RTTs (in milliseconds), are logged.
  • After 5 successful ping cycles, a log file is automatically created in the "logs" folder, containing all relevant details.
  • The program will display the log file path for 3 seconds and then exit automatically.

Instructions:

  • Start the test by running "start.bat" and choose the server by passing either "twitch" or "custom" as an argument.
  • Make sure you have network connectivity to the selected WebSocket server.

This tester is intended purely for development and testing purposes and does not interact with Twitch chat beyond the PING/PONG messages.


Setup Instructions:

  1. Install Node.js:

    • Download and install Node.js from https://nodejs.org/
    • Verify installation by running node -v and npm -v in the terminal.
  2. Clone or download this repository:

    • Open a terminal in the project folder.
  3. Install dependencies:

    • Run npm install to install the required packages (WebSocket, etc.).
    • The provided package.json ensures all dependencies are installed correctly.
  4. Run the tester with the "start.bat" file (change settings in it first):

    • Default (Twitch): node index.js twitch channelname
    • Custom server: node index.js custom
  5. Logs:

    • After 5 test pings, a log file will be created automatically in the logs folder.
    • The program will display the log file path for 3 seconds before exiting.

Notes:

  • Ensure you have an active internet connection for the chosen server.
  • This tester is intended for development and testing purposes only.

Conclusion:

This WebSocket tester provides a simple and effective way to verify WebSocket connectivity and measure response times for both Twitch and custom servers. All activities are logged in detail, including timestamps and RTTs, making it easy to review performance or diagnose connection issues.


Acknowledgements:

Thank you for using this tester! We hope it helps you quickly and reliably test your WebSocket servers. Feedback, improvements, or contributions are always welcome. Happy testing!

About

Simple Node.js tool to test WebSocket connections. Supports two servers: the public echo server (wss://echo.websocket.org) and Twitch chat. Functional but marked as an abandoned project.

Topics

Resources

License

Stars

Watchers

Forks