- LtsWidgets: Fixed Qt6 API compatibility issues - QWheelEvent::delta() → angleDelta().y() - QStyleOption::init() → initFrom() - QComboBox activated signal signature change - QTextCodec removal (UTF-8 default in Qt6) - Missing widget includes added - LtsWebSocket: Fixed m_logger reference initialization - Added NGLLoggerBootstrap includes - Proper initialization in constructor initializer lists - CMake: Added BUILD_LTSWEBSOCKET option for temporary exclusion - Docker: RTI Connext permanent installation script added - ci/install-rti-in-docker.sh for persistent RTI setup - Removes need for volume mounting RTI into container - BUILD options: FilterManagement, RTI, Codification, Grantlee, LtsWebSocket can be disabled for partial builds during migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
52 lines
1019 B
C++
52 lines
1019 B
C++
|
|
|
|
#pragma once
|
|
#include "logger.h"
|
|
#include "ltswebsocketserver_export.h"
|
|
#include "reply_message.h"
|
|
|
|
#include <QObject>
|
|
#include <QtCore/QQueue>
|
|
#include <QtCore/QThread>
|
|
|
|
class QWebSocket;
|
|
|
|
namespace LtsWebSocket
|
|
{
|
|
|
|
class LTSWEBSOCKETSERVER_EXPORT ClientConnection : public QThread, public ReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ClientConnection(QWebSocket* socket, QObject* parent = nullptr);
|
|
|
|
~ClientConnection();
|
|
|
|
bool init();
|
|
|
|
void addReply(ReplyMessage* message) override;
|
|
|
|
QWebSocket* webSocket()
|
|
{
|
|
return m_socket;
|
|
}
|
|
|
|
signals:
|
|
|
|
void newTextMessage(ClientConnection* client, const QString& message);
|
|
|
|
void disconnected(ClientConnection* client);
|
|
|
|
private slots:
|
|
void onNewTextMessageFromSocket(const QString& message);
|
|
void sendMessagesFromQueue();
|
|
void onSocketDisconnect();
|
|
|
|
private:
|
|
NGL::INGLLogger& m_logger;
|
|
void sendMessages();
|
|
QWebSocket* m_socket;
|
|
QQueue<ReplyMessage*> m_messageQueue;
|
|
};
|
|
} // namespace LtsWebSocket
|