https://github.com/sahil2k07/websockets-asp.net-core
This project describes the use of WebSockets in a .NET Core application.
https://github.com/sahil2k07/websockets-asp.net-core
dotnet-core websocket
Last synced: about 1 month ago
JSON representation
This project describes the use of WebSockets in a .NET Core application.
- Host: GitHub
- URL: https://github.com/sahil2k07/websockets-asp.net-core
- Owner: Sahil2k07
- License: mit
- Created: 2025-03-24T16:39:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T16:50:00.000Z (about 1 year ago)
- Last Synced: 2025-08-22T13:30:39.583Z (10 months ago)
- Topics: dotnet-core, websocket
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebSocket ASP.NET Core
This project is a simple WebSocket implementation that mimics a real-world one-on-one chat and group chat application. The goal was to understand WebSockets and how they handle real-time messaging efficiently. The architecture follows SOLID principles to keep the code modular and maintainable. 🚀
## ⚙️ Technologies Used
- **.NET** (ASP.NET Core)
- **WebSockets** for real-time communication
- **Dependency Injection** for maintainability
- **SOLID Principles** for clean architecture
## 🎯 Features
- ✅ One-to-one private chat
- ✅ Group chat functionality
- ✅ Users can join/leave groups dynamically
- ✅ Frontend compatibility with WebSocket clients
## 🔧 Installation & Setup
### 1️⃣ Clone the repository
```sh
git clone https://github.com/Sahil2k07/WebSockets-ASP.NET-Core.git
cd WebSockets-ASP.NET-Core
```
### 2️⃣ Install dependencies
```sh
dotnet restore
```
### 3️⃣ Run the server
```sh
dotnet run
```
## 📡 WebSocket Endpoints
| Endpoint | Description |
| --------------------------------- | ----------------------- |
| `/api/chat?userID=1&receiverID=2` | Private chat connection |
| `/api/group?groupID=1` | Group chat connection |
## 🛠️ Future Enhancements
- 🔹 **Database Integration** (Message persistence)
- 🔹 **User Authentication**
- 🔹 **Typing Indicators**
- 🔹 **Read Receipts**
## 📜 License
This project is **MIT Licensed**. Feel free to modify and use it!