13 #include <QAbstractSocket>
19 #include <QThreadPool>
45 explicit Server(QObject* parent =
nullptr);
64 void start(qint16 port = 2222);
81 QThreadPool* threadPool;
The Server class extends QTcpServer to handle incoming network connections.
Definition: server.h:33
void quit()
Stops the server by closing the listening socket.
Definition: server.cpp:37
~Server()
Destructor for the Server class.
Definition: server.cpp:12
void incomingConnection(qintptr handle) override
Handles incoming connections by creating and starting a ServerHandler instance.
Definition: server.cpp:43
void start(qint16 port=2222)
Starts the server and listens for incoming connections on the specified port.
Definition: server.cpp:20
Server(QObject *parent=nullptr)
Constructs a Server object with an optional parent.
Definition: server.cpp:3
This file contains the declaration of the ServerHandler class, which handles incoming client connecti...