Mock websocket server for load testing
944
Websocket mock server for load testing purposes.
This container was used to measure and optimize performance of client-side WebSocket implementations.
docker run jrosiek/websocket-mock-server:latest [-h HOST] [-p PORT]
# eg.
docker run --network=host jrosiek/websocket-mock-server:latest -h 0.0.0.0 -p 8765
After connecting to the server, it will work as an echo server.
At any time you can send a special json message to change mode of operation of the server. Once mode is changed, it cannot be changed back to echo mode.
The message should be in the following format:
{
"magic": "--wsm--",
"mode": "emit" | "sink",
// optional
"kwargs": {
...
}
}
The server will emit the same message at a regular interval.
kwargs can contain the following keys:
msg - the message to emit (type: string; default: 256 bytes of unspecified data)freq - the frequency of the message emission in (unit: 1/second; default: 1)The server will just ignore any messages sent to it.
No kwargs are supported in this mode.
Content type
Image
Digest
sha256:631122be1…
Size
48 MB
Last updated
about 1 year ago
docker pull jrosiek/websocket-mock-server