![]() |
Banking_System_Client
1.0.0
Qt-based banking app for user/admin account management, transactions, secure server communication via PostgreSQL/Supabase.
|
A class for managing client requests and responses. More...
#include <ClientHandler.h>
Public Slots | |
void | sendRequest (QJsonObject request) |
Sends a request to the server. More... | |
void | onResponseReady (QByteArray response) |
Slot to handle the response received from the server. More... | |
void | requestClientConnection (const QString &host, quint16 port) |
Requests a connection to the server. More... | |
void | requestClientDisconnection () |
Requests disconnection from the server. | |
void | onConnectedSignal () |
Slot to handle the connected signal. | |
void | onDisconnectedSignal () |
Slot to handle the disconnected signal. | |
Signals | |
void | sendResponseBack (QJsonObject response) |
Signal to send the response back to the window manager. More... | |
Public Member Functions | |
ClientHandler (QObject *parent=nullptr) | |
Constructor for ClientHandler. More... | |
~ClientHandler () | |
Destructor for ClientHandler. | |
void | run () |
Runs the event loop for the ClientHandler. | |
A class for managing client requests and responses.
The ClientHandler class handles the client-side operations such as sending requests, receiving responses, and managing connections. It uses the TcpClient class to handle the actual TCP communication.
|
explicit |
Constructor for ClientHandler.
parent | The parent QObject, default is nullptr. |
|
slot |
Slot to handle the response received from the server.
response | The response data in QByteArray format. |
Referenced by run().
|
slot |
Requests a connection to the server.
host | The server host. |
port | The server port. |
|
slot |
Sends a request to the server.
request | The JSON object containing the request data. |
|
signal |
Signal to send the response back to the window manager.
response | The JSON object containing the response data. |
Referenced by onConnectedSignal(), onDisconnectedSignal(), and onResponseReady().