https://github.com/rajput-vinay/pingpongws
This project is a simple WebSocket implementation to help you learn the basics of WebSocket communication in real-time. It uses the "ping-pong" pattern, where a client sends a ping message to the server, and the server responds with a pong.
https://github.com/rajput-vinay/pingpongws
reactjs typescript websocket
Last synced: about 1 month ago
JSON representation
This project is a simple WebSocket implementation to help you learn the basics of WebSocket communication in real-time. It uses the "ping-pong" pattern, where a client sends a ping message to the server, and the server responds with a pong.
- Host: GitHub
- URL: https://github.com/rajput-vinay/pingpongws
- Owner: Rajput-vinay
- Created: 2024-11-28T13:41:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T12:51:36.000Z (about 1 year ago)
- Last Synced: 2025-08-31T05:43:51.075Z (10 months ago)
- Topics: reactjs, typescript, websocket
- Language: TypeScript
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ping-Pong WebSocket Project 🎾
This project is a simple WebSocket implementation to help you learn the basics of WebSocket communication in real-time. It uses the "ping-pong" pattern, where a **client** sends a `ping` message to the **server**, and the server responds with a `pong`.
---
## Features 📋
- Establish a WebSocket connection between a server and a client.
- Handle real-time communication using `ping` and `pong` messages.
- Dynamic client interaction via React.
- Implemented with TypeScript for enhanced type safety.
---
## How It Works 🛠️
1. **Server**:
- Listens on port `8080`.
- Responds with `pong` when it receives a `ping` message.
2. **Client**:
- Connects to the WebSocket server.
- Sends `ping` messages and displays the `pong` response in a list.
---
## Tech Stack 💻
### Backend:
- **Node.js**
- **ws**: WebSocket library for Node.js.
### Frontend:
- **React**: For building the user interface.
- **TypeScript**: For strict type checking.
---
## Prerequisites 🚀
- **Node.js**
- **npm** or **yarn**
- Basic understanding of WebSocket communication.
---