This project is running a nodejs server in which we have implemented websocket protocol without using socket.io(or any other alternative).
This WebSocket server allows communication between clients and the server using the WebSocket protocol. It handles WebSocket upgrade requests and manages WebSocket connections.
- Handles WebSocket upgrade requests
- Supports WebSocket communication with clients
- Parses WebSocket frames and messages
- Clone the repository:
git clone https://github.com/mayank-sahai/socket-js
- Install dependencies:
cd websocket-server
npm install
To use this WebSocket server, follow these steps:
- Start the server by
npm start
- Open
index.js
in your browser it will straight away start the handshake and send/receive messages - Check logs (if you want 😄 )