Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 979 Bytes

README.md

File metadata and controls

47 lines (30 loc) · 979 Bytes

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.