https://github.com/kaustubh187/chat-application-in-go
Multi-threaded chat application in Golang using tcp based socket programming
https://github.com/kaustubh187/chat-application-in-go
chat-application client-server-architecture golang golang-net socket-programming tcp-server
Last synced: about 1 year ago
JSON representation
Multi-threaded chat application in Golang using tcp based socket programming
- Host: GitHub
- URL: https://github.com/kaustubh187/chat-application-in-go
- Owner: kaustubh187
- Created: 2024-10-29T19:26:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-29T19:52:26.000Z (over 1 year ago)
- Last Synced: 2025-02-13T12:19:27.442Z (over 1 year ago)
- Topics: chat-application, client-server-architecture, golang, golang-net, socket-programming, tcp-server
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat Room Server in Go
This Go application creates a TCP-based chat server that allows multiple clients to join and communicate within different chat rooms. Clients can choose from one of three available chat rooms (Sports, Games, or Geopolitics) and send messages that are broadcasted to all other participants in the same room.
## Overview
The server application operates as follows:
- Create Rooms: It initializes three chat rooms using maps to store each room’s participants and their connections.
- Client Connections: It listens for incoming client connections and assigns each client a unique ID.
- Room Selection: Once connected, clients are prompted to select a room to join.
- Message Handling: The server listens to each client's messages and broadcasts them to all other clients in the same room.
## Features
- Multi-room Support: Three separate chat rooms (Sports, Games, Geopolitics) allow clients to select and chat with users interested in specific topics.
Concurrent Connections: Uses Go routines to handle multiple client connections simultaneously.
- Synchronized Map Access: Uses a mutex to synchronize access to each room's map, ensuring thread safety for concurrent reads and writes.
## Prerequisites
-> Go (v1.15+)
# Screenshots


