Skip to content

Csasaka19/Chatroom-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatroom-App

Chatroom Application implemented using python3 and socket programming.

Go on invite your friends for a nice chat!

Prerequisites

Ensure python3 is installed in your machine to run the command line implementation.

You can download Python from the official website here.

Tkinter for the GUI:

sudo apt install python3-tk

More about Tkinter here.

COMMAND_LINE IMPLEMENTATION

In many systems, using ports below 1024 requires superuser (sudo) privileges. This is a security feature to prevent non-privileged users from starting services that listen on well-known ports.

If you don't want to run the server with sudo privileges, you can use a port number greater than 1024.Change the PORTS variable appropriately.

Starting the server

cd command-line
run sudo python3 MyServer.py

or alternatively from the root repository:
run sudo python3 command-line/MyServer.py

Starting_Server

Clients

cd command-line
run  python3 MyClient.py

or alternatively from the root repository:
run python3 command-line/MyClient.py

Different clients need different terminals.

Client CC created.Messages sent Client_Server

Client Noni created.Messages sent Client_Server

Client Imposter created.Messages sent Client_Server

Main server receiving messages

Messages being received Main_Server

Connections closed by clients

Connections closed Starting_Server

Disclaimer

Host 0.0.0.0 will listen to all IP addresses.Listening on all interfaces could potentially expose your server to the internet (if it's connected), which could be a security risk if your server is not secured properly.

Always make sure to implement proper security measures when writing server software.

GRAPHICAL USER INTERFACE IMPLEMENTATION

Starting the graphical server

cd GUI
run  python3 graphical-server.py

or alternatively from the root repository:
run python3 GUI/graphical-server.py

Server-Start

Graphical Chatroom

cd GUI
run  python3 graphical-client.py

or alternatively from the root repository:
run python3 GUI/graphical-client.py

Requires more than one session in the room.
  • A username is required for a chatroom session

Username

  • Chatroom

ChatRoom

Main server receiving connections

Connections

  • The GUI can be done by different devices within the same network for ease in communication.

Acknowledgements