Skip to content

A multi-threaded client-server chat application in Golang. Uses goroutines and raw sockets extensively.

License

Notifications You must be signed in to change notification settings

krithikvaidya/go_chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client-Server Chat Application in Golang

How to run:

  • Clone the repository
  • Change directory to the repo's root folder

Client:

./go_chat -h "<server ip:port>" -p "<server-password>"

Server

./go_chat -s -p "<server-password>"

Message Protocol:

  1. pm <username> <message> --> from client to server, unicast message
  2. broadcast <message> --> from client to server, broadcast message

Screenshots:

Execution with 1 server, 3 clients:

  • Server:

  • Client 1:

  • Client 2:

  • Client 3: image

Features

  • Personal messages and Broadcast messages.
  • Multithreading at Server and Client sides using goroutines.
  • Multithread synchronization using Mutex locks.
  • Network communication using raw sockets.

About

A multi-threaded client-server chat application in Golang. Uses goroutines and raw sockets extensively.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published