1
0
This repository has been archived on 2026-06-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
WebSocket-Tester/README.md
T
2026-06-30 00:30:34 +02:00

4.0 KiB

WebSocket Test Server

This is a simple WebSocket test tool designed for verifying connections, testing latency, and measuring Round-Trip Time (RTT).



How it works:

  • Dual Mode: The tester can connect to either the Twitch IRC WebSocket server or a custom WebSocket server (e.g. an echo test server, see Recommended CTS for more).
  • Interactive Start: Run the starter script start.bat on Windows or start.sh on Linux and choose the run mode and target directly in the terminal.
  • Ping Cycle: Once connected, the tester will send 5 test PINGs (1 every 5 seconds) to the chosen server:
    • Custom servers: Sends a PING message and waits for the echo response to measure RTT (Real-Time-Text).
    • Twitch: Sends PING :tmi.twitch.tv and logs the incoming Twitch server data.

Logging:

  • All sent and received messages, including timestamps and RTTs (in milliseconds), are tracked in real-time.
  • After 5 successful ping cycles, a log file is automatically created in the "logs" folder, containing all relevant details.
  • The program displays the final log file path and exit automatically after 3 seconds.

Setup & Installation:

  1. Install Node.js:

    • Download and install Node.js
    • Verify installation by running node -v and npm -v in your terminal.
  2. Prepare the Project:

    • Clone or download this repository and open a terminal in the project folder.
  3. Install dependencies:

    • Run the following command to install the required packages:
    npm install
    

How to Run

Instead of typing long commands, use the provided interactive starter scripts:

Windows

Double-click start.bator run it via CMD with:

start.bat

Linux / MacOS

Firstly you have to give the start.sh execution permissions with:

chmod +x start.sh

Then you can start the script with:

./start.sh

Manual Execution (Advanced)

If you prefer to bypass the interactive scripts, you can run the node application directly:

  • Custom server mode (default): node index.js custom [custom_url]
  • Twitch mode: node index.js twitch [channel_name]

Notes

  • Defaults: If you leave the target blank in custom mode, it will automatically fallback to wss://echo.websocket.org
  • Scope: This tester is intended purely for development and network diagnostics. It does NOT interact with Twitch chat features beyond authentication and standard PING/PONG messages.

If you want to test the custom mode with different public endpoints, you can use these reliable and free WebSocket echo services:

  • wss://echo.websocket.org (Default)
    • Provider: Built-in fallback
    • Behavior: Standard high-availability echo server that mirrors back any text or PING sent to it.
  • wss://echo.websocket.in
    • Provider: PieSocket
    • Behavior: A fast and secure public testing endpoint, ideal for checking raw text frame stability.
  • wss://ws.postman-echo.com/raw
    • Provider: Postman
    • Behavior: Part of Postman's official utility stack. It returns an exact copy of the sent payloads and is perfect for latency testing.

Note: Make sure your firewall or network security settings allow outgoing connections on port 443 (SSL) for these addresses.


Acknowledgements:

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