Accelerated Computation Engine
Public Member Functions | Protected Member Functions | List of all members
Ace::LogServer::Thread Class Reference

#include <ace_logserver_thread.h>

Inheritance diagram for Ace::LogServer::Thread:

Public Member Functions

 Thread (int port, QObject *parent=nullptr)
 
void wait ()
 
void broadcast (const QByteArray &data)
 

Protected Member Functions

virtual void run () override final
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
portThe port number this new thread's internal TCP server will listen on for client connections.
parentOptional parent for this new thread.

Member Function Documentation

◆ 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
dataAny optional data that is appended to the message.

◆ run()

void LogServer::Thread::run ( )
finaloverrideprotectedvirtual

Implements QThread::run.

◆ 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: