#include <ace_logserver_thread.h>
|
| Thread (int port, QObject *parent=nullptr) |
|
void | wait () |
|
void | broadcast (const QByteArray &data) |
|
|
virtual void | run () override final |
|
This is the internal TCP server that is used by the log server. This is a qt thread that runs a TCP server inside its own thread since a Qt server and its sockets must all run on the same thread. To communicate with this thread a mutex and atomic integer switches are used. WARNING: the TCP server is not initialized and started until the thread is started.
◆ Thread()
LogServer::Thread::Thread |
( |
int |
port, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
Constructs a new thread instance with the given listening port and optional parent. This does NOT start the TCP server.
- Parameters
-
port | The port number this new thread's internal TCP server will listen on for client connections. |
parent | Optional parent for this new thread. |
◆ broadcast()
void LogServer::Thread::broadcast |
( |
const QByteArray & |
data | ) |
|
Writes out the given message to all connected clients on this thread's internal TCP server.
- Parameters
-
data | Any optional data that is appended to the message. |
◆ run()
void LogServer::Thread::run |
( |
| ) |
|
|
finaloverrideprotectedvirtual |
◆ wait()
void LogServer::Thread::wait |
( |
| ) |
|
Blocks execution of the calling thread until a connected logging client signals the ACE application to start.
The documentation for this class was generated from the following files: