- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 lines
806 B
C++
39 lines
806 B
C++
|
|
|
|
#include "server.h"
|
|
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
#include <QtNetwork/QTcpSocket>
|
|
|
|
#include "worker.h"
|
|
|
|
TTServer::TTServer(const TTSArgs &ttsArgs)
|
|
: m_ttsArgs(ttsArgs)
|
|
.getNGLLogger("TTServer"))
|
|
{
|
|
connect(this, &TTServer::newConnection,
|
|
this, &TTServer::onNewConnection);
|
|
}
|
|
|
|
void TTServer::onNewConnection()
|
|
{
|
|
QTcpSocket *sock = nextPendingConnection();
|
|
if (!sock)
|
|
return;
|
|
NOTICE_LOG(m_logger) << "New incoming connection from "
|
|
<< sock->peerName() << ":"
|
|
<< sock->peerPort();
|
|
|
|
TTWorker *ttw = new TTWorker(sock, m_ttsArgs);
|
|
if (!ttw->init())
|
|
exit(5);
|
|
|
|
connect(sock, &QTcpSocket::disconnected,
|
|
this, &TTServer::onDisconnect);
|
|
}
|
|
|
|
void TTServer::onDisconnect()
|
|
{
|
|
NOTICE_LOG(m_logger) << "Disconnected";
|
|
}
|