Table of Contents
Virtual Web Socket project using .NET that allows developers to test WebSocket functionality. Virtual Web Socket project provides an endpoint through which developers can connect to a WebSocket channel from any application and send desired messages over WebSocket with the ability to specify the number of messages, time intervals, and content. It serves as a useful tool for developers who want to experiment with WebSocket communication and validate the behavior of their applications in various scenarios. By facilitating easy and customizable message sending, the project simplifies the testing process and helps developers ensure the robustness and reliability of their WebSocket implementations.
Technologies needed to get the project up and running
Follow the steps below to run the project in your local
-
Clone the repo
git clone https://github.com/muhammetcagatay/virtual-web-socket
-
Go to project folder
cd virtual-web-socket
-
Create docker image and create and run docker container
docker build -t virtual-web-socket . docker run -p 80:80 virtual-web-socket
Listening and serving API and WebSocket on : 80
The following url should be used to create a new websocket: ws://localhost:80/ws/channel/{channelName}
Method | Path | Query Params | Body |
---|---|---|---|
POST |
/api/socket/sendMessage |
channelName : The web socket channel name to which the message will be sent messageCount : number of messages to be sent interval : time interval between messages |
json model to be sent over web socket |