SpeakAPP is a chat application built for the Udacity C++ Nanodegree Program final course. The application is built using Qt5 framework based on the "Client-Server" network architecture. Each client should connect to the server to be able to send/receive messages. The server receives messages from any connected client, and then send the message to the other clients.
The application has 2 modes:
Server Mode
: At least one server should be running to be able to run and receive messages.
Client Mode
: Users send and receive messages when the application is running in this mode.
These files contain the main classes of the application:
clientcommunication.h
: ContainsClientCommunication
class. This class is responsible for sending/receiving messages from/to the server. It owns the communication socket and the messages model. Implemented inclientcommunication.cpp
source file.clientwindow.h
: ContainsClientWindow
class. This class is responsible for the creation of the client window. It owns a ClientCommunication object that is resposbile for TCP client connection. Implemented inclientwindow.cpp
source file.modewindow.h
: ContainsModeWindow
class. This class is responsible for the creation of the mode window. It owns a client window and a server window. It creates client/server window depending on the user choice. Implemented inmodewindow.cpp
source file.servercommunication.h
: ContainsServerCommunication
class. This class is responsible for sending/receiving messages from/to clients. It owns the tcp server object and the clients sockets. Implemented inservercommunication.cpp
source file.serverwindow.h
: Contains ServerWindow class. This class is responsible for the creation of the server window. It owns a ServerCommunication object that is resposbile for TCP server connection. Implemented inserverwindow.cpp
source file.
The application depends on Qt5. The build script speakapp_build.sh
installs this dependency. The versions required are Qt 5.12.8 and qmake 3.1.
- Clone this repo.
- Run the build script
speakapp_build.sh
from the project root folder i.e. where the .pro file exists. If the application is successfully built, the../build
build directory is created.
- From the build directory
build/
, run the application using./SpeakAPP
- Click on
I'm the boss, I let conversations happen!
button. This will start the server.
- README:
README.md
file. - Compiling and Testing:
speakapp_build.sh
script is used to build the project. It usesqmake
andmake
build system. - Loops, Functions, I/O:
- The project code is clearly organized into functions and classes. Example:
servercommunication.cpp
file. - The project accepts input from a user as part of the necessary operation. This is done using the GUI. Example:
Mode Window
,Client Window
,Server Window
- The project code is clearly organized into functions and classes. Example:
- Object Oriented Programming: The project implements OOP principles. Example:
serverwindow.cpp
. - Memory Management: The projects uses smart pointers (see
clientwindow.h
andserverwindow.h
). It also uses Destructors properly and implements RAII. - Concurrency: The project is multithreaded. Example:
ServerWindow::showNumberClients()
method inserverwindow.cpp
source file.
- Fedi Salhi Linkedin