19 #include <QtCore/QHash> 20 #include <QtCore/QThread> 21 #include <QtNetwork/QTcpServer> 22 #include <QtCore/QTimer> 43 int activeConnections()
const;
46 Q_INVOKABLE
void startServer(quint16
port);
50 void sendMessage(
const QString &message);
60 void incomingConnection(qintptr socketDescriptor)
override;
63 void startConnection(
Connection * connectionWorker);
67 Connection *connection(
const QHostAddress &ip,
int port)
const;
72 Connection *connection(
const QHostAddress &ip)
const;
80 QHash<QThread *, Connection *> mConnections;
83 std::function<Connection *()> mConnectionFactory;
static const int port
Definition: trikCommunicatorTest.cpp:24
Server that can handle multiple clients. Actual work is done in separate threads by Connection object...
Definition: trikServer.h:31
Definition: trikCommunicator.h:31
#define TRIKNETWORK_EXPORT
Definition: declSpec.h:23
Abstract class that serves one client of TrikServer.
Definition: connection.h:50