A WebSocket client to receive messages from a server using JavaScript and HTML.
View Demo
·
Report Bug
·
Request Feature
Since I found it difficult to find a good WebSocket client that only uses html and only receives messages, I implemented this. The main purpose is to implement a client for Korabli-chatrans.
The css and javascript files are in the css and js folders respectively. The html file is in the root folder named index.html
. Just open the html file in a browser and you are good to go.
- Open the
index.html
file in a browser. - Click the config button on the top right corner to open the configuration modal.
- Choose the protocol (ws or wss) from the dropdown. Only
wss
is allowed if the server useshttps
. - Input the server address and port in the input fields.
- Click the
Connect
button to connect to the server. - If the connection is successful, the modal will close after about 2 seconds and the messages will start to appear in the message box.
Config Example | Receiving Example |
---|---|
Any contributions you make are greatly appreciated. You can fork the project and make a pull request. Also, you can open an issue if you find a bug or want to request a feature.
Distributed under the MIT License. See LICENSE
for more information.