mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -07:00
more ServerNetwork code
This commit is contained in:
parent
6bbc76af2b
commit
c9b66e4239
21 changed files with 441 additions and 35 deletions
122
servatrice/src/networkserverinterface.cpp
Normal file
122
servatrice/src/networkserverinterface.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
#include "networkserverinterface.h"
|
||||
#include <QSslSocket>
|
||||
#include "server_logger.h"
|
||||
#include "main.h"
|
||||
#include "server_protocolhandler.h"
|
||||
#include "server_room.h"
|
||||
|
||||
#include "pb/servernetwork_message.pb.h"
|
||||
#include "pb/event_server_complete_list.pb.h"
|
||||
#include <google/protobuf/descriptor.h>
|
||||
|
||||
NetworkServerInterface::NetworkServerInterface(Servatrice *_server, QSslSocket *_socket)
|
||||
: QObject(), server(_server), socket(_socket), messageInProgress(false)
|
||||
{
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(readClient()));
|
||||
connect(socket, SIGNAL(disconnected()), this, SLOT(deleteLater()));
|
||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(catchSocketError(QAbstractSocket::SocketError)));
|
||||
connect(this, SIGNAL(outputBufferChanged()), this, SLOT(flushOutputBuffer()), Qt::QueuedConnection);
|
||||
|
||||
Event_ServerCompleteList event;
|
||||
event.set_server_id(server->getServerId());
|
||||
|
||||
server->serverMutex.lock();
|
||||
QMapIterator<QString, Server_ProtocolHandler *> userIterator(server->getUsers());
|
||||
while (userIterator.hasNext())
|
||||
event.add_user_list()->CopyFrom(userIterator.next().value()->copyUserInfo(true, true));
|
||||
|
||||
QMapIterator<int, Server_Room *> roomIterator(server->getRooms());
|
||||
while (roomIterator.hasNext()) {
|
||||
Server_Room *room = roomIterator.next().value();
|
||||
room->roomMutex.lock();
|
||||
event.add_room_list()->CopyFrom(room->getInfo(true, true, false));
|
||||
}
|
||||
|
||||
ServerNetworkMessage message;
|
||||
message.set_message_type(ServerNetworkMessage::SESSION_EVENT);
|
||||
SessionEvent *sessionEvent = message.mutable_session_event();
|
||||
sessionEvent->GetReflection()->MutableMessage(sessionEvent, event.GetDescriptor()->FindExtensionByName("ext"))->CopyFrom(event);
|
||||
transmitMessage(message);
|
||||
|
||||
server->addNetworkServerInterface(this);
|
||||
|
||||
roomIterator.toFront();
|
||||
while (roomIterator.hasNext())
|
||||
roomIterator.next().value()->roomMutex.unlock();
|
||||
server->serverMutex.unlock();
|
||||
}
|
||||
|
||||
NetworkServerInterface::~NetworkServerInterface()
|
||||
{
|
||||
logger->logMessage("[SN] session ended", this);
|
||||
|
||||
flushOutputBuffer();
|
||||
}
|
||||
|
||||
void NetworkServerInterface::flushOutputBuffer()
|
||||
{
|
||||
QMutexLocker locker(&outputBufferMutex);
|
||||
if (outputBuffer.isEmpty())
|
||||
return;
|
||||
server->incTxBytes(outputBuffer.size());
|
||||
socket->write(outputBuffer);
|
||||
socket->flush();
|
||||
outputBuffer.clear();
|
||||
}
|
||||
|
||||
void NetworkServerInterface::readClient()
|
||||
{
|
||||
QByteArray data = socket->readAll();
|
||||
server->incRxBytes(data.size());
|
||||
inputBuffer.append(data);
|
||||
|
||||
do {
|
||||
if (!messageInProgress) {
|
||||
if (inputBuffer.size() >= 4) {
|
||||
messageLength = (((quint32) (unsigned char) inputBuffer[0]) << 24)
|
||||
+ (((quint32) (unsigned char) inputBuffer[1]) << 16)
|
||||
+ (((quint32) (unsigned char) inputBuffer[2]) << 8)
|
||||
+ ((quint32) (unsigned char) inputBuffer[3]);
|
||||
inputBuffer.remove(0, 4);
|
||||
messageInProgress = true;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
if (inputBuffer.size() < messageLength)
|
||||
return;
|
||||
|
||||
ServerNetworkMessage newMessage;
|
||||
newMessage.ParseFromArray(inputBuffer.data(), messageLength);
|
||||
inputBuffer.remove(0, messageLength);
|
||||
messageInProgress = false;
|
||||
|
||||
processMessage(newMessage);
|
||||
} while (!inputBuffer.isEmpty());
|
||||
}
|
||||
|
||||
void NetworkServerInterface::catchSocketError(QAbstractSocket::SocketError socketError)
|
||||
{
|
||||
qDebug() << "Socket error:" << socketError;
|
||||
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void NetworkServerInterface::transmitMessage(const ServerNetworkMessage &item)
|
||||
{
|
||||
QByteArray buf;
|
||||
unsigned int size = item.ByteSize();
|
||||
buf.resize(size + 4);
|
||||
item.SerializeToArray(buf.data() + 4, size);
|
||||
buf.data()[3] = (unsigned char) size;
|
||||
buf.data()[2] = (unsigned char) (size >> 8);
|
||||
buf.data()[1] = (unsigned char) (size >> 16);
|
||||
buf.data()[0] = (unsigned char) (size >> 24);
|
||||
|
||||
QMutexLocker locker(&outputBufferMutex);
|
||||
outputBuffer.append(buf);
|
||||
emit outputBufferChanged();
|
||||
}
|
||||
|
||||
void NetworkServerInterface::processMessage(const ServerNetworkMessage &item)
|
||||
{
|
||||
}
|
||||
35
servatrice/src/networkserverinterface.h
Normal file
35
servatrice/src/networkserverinterface.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef NETWORKSERVERINTERFACE_H
|
||||
#define NETWORKSERVERINTERFACE_H
|
||||
|
||||
#include "servatrice.h"
|
||||
|
||||
class Servatrice;
|
||||
class QSslSocket;
|
||||
class ServerNetworkMessage;
|
||||
|
||||
class NetworkServerInterface : public QObject {
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void readClient();
|
||||
void catchSocketError(QAbstractSocket::SocketError socketError);
|
||||
void flushOutputBuffer();
|
||||
signals:
|
||||
void outputBufferChanged();
|
||||
private:
|
||||
QMutex outputBufferMutex;
|
||||
Servatrice *server;
|
||||
QSslSocket *socket;
|
||||
|
||||
QByteArray inputBuffer, outputBuffer;
|
||||
bool messageInProgress;
|
||||
int messageLength;
|
||||
|
||||
void processMessage(const ServerNetworkMessage &item);
|
||||
public:
|
||||
NetworkServerInterface(Servatrice *_server, QSslSocket *_socket);
|
||||
~NetworkServerInterface();
|
||||
|
||||
void transmitMessage(const ServerNetworkMessage &item);
|
||||
};
|
||||
|
||||
#endif
|
||||
60
servatrice/src/networkserverthread.cpp
Normal file
60
servatrice/src/networkserverthread.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#include "networkserverthread.h"
|
||||
#include "networkserverinterface.h"
|
||||
#include "server_logger.h"
|
||||
#include "servatrice.h"
|
||||
#include "main.h"
|
||||
#include <QSslSocket>
|
||||
|
||||
NetworkServerThread::NetworkServerThread(int _socketDescriptor, Servatrice *_server, const QSslCertificate &_cert, const QSslKey &_privateKey, QObject *parent)
|
||||
: QThread(parent), server(_server), socketDescriptor(_socketDescriptor), cert(_cert), privateKey(_privateKey)
|
||||
{
|
||||
connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
|
||||
}
|
||||
|
||||
NetworkServerThread::~NetworkServerThread()
|
||||
{
|
||||
quit();
|
||||
wait();
|
||||
|
||||
delete socket;
|
||||
}
|
||||
|
||||
void NetworkServerThread::run()
|
||||
{
|
||||
socket = new QSslSocket;
|
||||
socket->setSocketDescriptor(socketDescriptor);
|
||||
socket->setLocalCertificate(cert);
|
||||
socket->setPrivateKey(privateKey);
|
||||
|
||||
logger->logMessage(QString("[SN] incoming connection: %1").arg(socket->peerAddress().toString()));
|
||||
|
||||
QList<ServerProperties> serverList = server->getServerList();
|
||||
int listIndex = -1;
|
||||
for (int i = 0; i < serverList.size(); ++i)
|
||||
if (serverList[i].address == socket->peerAddress()) {
|
||||
listIndex = i;
|
||||
break;
|
||||
}
|
||||
if (listIndex == -1) {
|
||||
logger->logMessage(QString("[SN] address %1 unknown, terminating connection").arg(socket->peerAddress().toString()));
|
||||
return;
|
||||
}
|
||||
|
||||
socket->startServerEncryption();
|
||||
if (!socket->waitForEncrypted(5000)) {
|
||||
logger->logMessage(QString("[SN] SSL handshake timeout, terminating connection"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (serverList[listIndex].cert == socket->peerCertificate())
|
||||
logger->logMessage(QString("[SN] Peer authenticated as " + serverList[listIndex].hostname));
|
||||
else {
|
||||
logger->logMessage(QString("[SN] Authentication failed, terminating connection"));
|
||||
return;
|
||||
}
|
||||
|
||||
interface = new NetworkServerInterface(server, socket);
|
||||
connect(interface, SIGNAL(destroyed()), this, SLOT(deleteLater()));
|
||||
|
||||
exec();
|
||||
}
|
||||
28
servatrice/src/networkserverthread.h
Normal file
28
servatrice/src/networkserverthread.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef NETWORKSERVERTHREAD_H
|
||||
#define NETWORKSERVERTHREAD_H
|
||||
|
||||
#include <QThread>
|
||||
#include <QSslCertificate>
|
||||
#include <QSslKey>
|
||||
|
||||
class Servatrice;
|
||||
class NetworkServerInterface;
|
||||
class QSslSocket;
|
||||
|
||||
class NetworkServerThread : public QThread {
|
||||
Q_OBJECT
|
||||
private:
|
||||
Servatrice *server;
|
||||
NetworkServerInterface *interface;
|
||||
QSslCertificate cert;
|
||||
QSslKey privateKey;
|
||||
int socketDescriptor;
|
||||
QSslSocket *socket;
|
||||
public:
|
||||
NetworkServerThread(int _socketDescriptor, Servatrice *_server, const QSslCertificate &_cert, const QSslKey &_privateKey, QObject *parent = 0);
|
||||
~NetworkServerThread();
|
||||
protected:
|
||||
void run();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -21,11 +21,11 @@
|
|||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <iostream>
|
||||
#include <QSslSocket>
|
||||
#include "servatrice.h"
|
||||
#include "server_room.h"
|
||||
#include "serversocketinterface.h"
|
||||
#include "serversocketthread.h"
|
||||
#include "networkserverthread.h"
|
||||
#include "server_logger.h"
|
||||
#include "main.h"
|
||||
#include "passwordhasher.h"
|
||||
|
|
@ -50,13 +50,8 @@ void Servatrice_GameServer::incomingConnection(int socketDescriptor)
|
|||
|
||||
void Servatrice_NetworkServer::incomingConnection(int socketDescriptor)
|
||||
{
|
||||
QSslSocket *socket = new QSslSocket;
|
||||
socket->setLocalCertificate(cert);
|
||||
socket->setPrivateKey(privateKey);
|
||||
socket->setSocketDescriptor(socketDescriptor);
|
||||
socket->startServerEncryption();
|
||||
// SocketInterface *ssi = new ServerSocketInterface(server, socket);
|
||||
// logger->logMessage(QString("Incoming server network connection: %1").arg(socket->peerAddress().toString()), ssi);
|
||||
NetworkServerThread *thread = new NetworkServerThread(socketDescriptor, server, cert, privateKey);
|
||||
thread->start();
|
||||
}
|
||||
|
||||
Servatrice::Servatrice(QSettings *_settings, QObject *parent)
|
||||
|
|
@ -100,11 +95,13 @@ Servatrice::Servatrice(QSettings *_settings, QObject *parent)
|
|||
if (databaseType != DatabaseNone)
|
||||
openDatabase();
|
||||
|
||||
updateServerList();
|
||||
clearSessionTables();
|
||||
|
||||
try { if (settings->value("servernetwork/active", 0).toInt()) {
|
||||
qDebug() << "Connecting to server network.";
|
||||
const QString certFileName = settings->value("servernetwork/ssl_cert").toString();
|
||||
const QString keyFileName = settings->value("servernetwork/ssl_key").toString();
|
||||
const QString passphrase = settings->value("servernetwork/ssl_passphrase").toString();
|
||||
qDebug() << "Loading certificate...";
|
||||
QFile certFile(certFileName);
|
||||
if (!certFile.open(QIODevice::ReadOnly))
|
||||
|
|
@ -116,7 +113,7 @@ Servatrice::Servatrice(QSettings *_settings, QObject *parent)
|
|||
QFile keyFile(keyFileName);
|
||||
if (!keyFile.open(QIODevice::ReadOnly))
|
||||
throw QString("Error opening private key file: %1").arg(keyFileName);
|
||||
QSslKey key(&keyFile, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, passphrase.toAscii());
|
||||
QSslKey key(&keyFile, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
|
||||
if (key.isNull())
|
||||
throw QString("Invalid private key.");
|
||||
|
||||
|
|
@ -235,6 +232,34 @@ bool Servatrice::execSqlQuery(QSqlQuery &query)
|
|||
return false;
|
||||
}
|
||||
|
||||
void Servatrice::updateServerList()
|
||||
{
|
||||
qDebug() << "Updating server list...";
|
||||
|
||||
serverListMutex.lock();
|
||||
serverList.clear();
|
||||
|
||||
QSqlQuery query;
|
||||
query.prepare("select id, ssl_cert, hostname, address, game_port, control_port from " + dbPrefix + "_servers order by id asc");
|
||||
execSqlQuery(query);
|
||||
while (query.next()) {
|
||||
ServerProperties prop(query.value(0).toInt(), QSslCertificate(query.value(1).toString().toAscii()), query.value(2).toString(), QHostAddress(query.value(3).toString()), query.value(4).toInt(), query.value(5).toInt());
|
||||
serverList.append(prop);
|
||||
qDebug() << QString("#%1 CERT=%2 NAME=%3 IP=%4:%5 CPORT=%6").arg(prop.id).arg(QString(prop.cert.digest().toHex())).arg(prop.hostname).arg(prop.address.toString()).arg(prop.gamePort).arg(prop.controlPort);
|
||||
}
|
||||
|
||||
serverListMutex.unlock();
|
||||
}
|
||||
|
||||
QList<ServerProperties> Servatrice::getServerList() const
|
||||
{
|
||||
serverListMutex.lock();
|
||||
QList<ServerProperties> result = serverList;
|
||||
serverListMutex.unlock();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
AuthenticationResult Servatrice::checkUserPassword(Server_ProtocolHandler *handler, const QString &user, const QString &password, QString &reasonStr)
|
||||
{
|
||||
QMutexLocker locker(&dbMutex);
|
||||
|
|
@ -461,6 +486,37 @@ QList<ServerSocketInterface *> Servatrice::getUsersWithAddressAsList(const QHost
|
|||
return result;
|
||||
}
|
||||
|
||||
void Servatrice::clearSessionTables()
|
||||
{
|
||||
lockSessionTables();
|
||||
QSqlQuery query;
|
||||
query.prepare("update " + dbPrefix + "_sessions set end_time=now() where end_time is null and id_server = :id_server");
|
||||
query.bindValue(":id_server", serverId);
|
||||
query.exec();
|
||||
unlockSessionTables();
|
||||
}
|
||||
|
||||
void Servatrice::lockSessionTables()
|
||||
{
|
||||
QSqlQuery("lock tables " + dbPrefix + "_sessions write, " + dbPrefix + "_users read").exec();
|
||||
}
|
||||
|
||||
void Servatrice::unlockSessionTables()
|
||||
{
|
||||
QSqlQuery("unlock tables").exec();
|
||||
}
|
||||
|
||||
bool Servatrice::userSessionExists(const QString &userName)
|
||||
{
|
||||
// Call only after lockSessionTables().
|
||||
|
||||
QSqlQuery query;
|
||||
query.prepare("select 1 from " + dbPrefix + "_sessions where user_name = :user_name and end_time is null");
|
||||
query.bindValue(":user_name", userName);
|
||||
query.exec();
|
||||
return query.next();
|
||||
}
|
||||
|
||||
int Servatrice::startSession(const QString &userName, const QString &address)
|
||||
{
|
||||
if (authenticationMethod == AuthenticationNone)
|
||||
|
|
@ -489,9 +545,11 @@ void Servatrice::endSession(int sessionId)
|
|||
return;
|
||||
|
||||
QSqlQuery query;
|
||||
query.exec("lock tables " + dbPrefix + "_sessions read");
|
||||
query.prepare("update " + dbPrefix + "_sessions set end_time=NOW() where id = :id_session");
|
||||
query.bindValue(":id_session", sessionId);
|
||||
execSqlQuery(query);
|
||||
query.exec("unlock tables");
|
||||
}
|
||||
|
||||
QMap<QString, ServerInfo_User> Servatrice::getBuddyList(const QString &name)
|
||||
|
|
@ -751,3 +809,14 @@ void Servatrice::shutdownTimeout()
|
|||
if (!shutdownMinutes)
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void Servatrice::addNetworkServerInterface(NetworkServerInterface *interface)
|
||||
{
|
||||
networkServerInterfaces.append(interface);
|
||||
}
|
||||
|
||||
void Servatrice::removeNetworkServerInterface(NetworkServerInterface *interface)
|
||||
{
|
||||
// XXX we probably need to delete everything that belonged to it...
|
||||
networkServerInterfaces.removeAt(networkServerInterfaces.indexOf(interface));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <QMutex>
|
||||
#include <QSslCertificate>
|
||||
#include <QSslKey>
|
||||
#include <QHostAddress>
|
||||
#include "server.h"
|
||||
|
||||
class QSqlDatabase;
|
||||
|
|
@ -34,6 +35,7 @@ class QTimer;
|
|||
class GameReplay;
|
||||
class Servatrice;
|
||||
class ServerSocketInterface;
|
||||
class NetworkServerInterface;
|
||||
|
||||
class Servatrice_GameServer : public QTcpServer {
|
||||
Q_OBJECT
|
||||
|
|
@ -60,6 +62,19 @@ protected:
|
|||
void incomingConnection(int socketDescriptor);
|
||||
};
|
||||
|
||||
class ServerProperties {
|
||||
public:
|
||||
int id;
|
||||
QSslCertificate cert;
|
||||
QString hostname;
|
||||
QHostAddress address;
|
||||
int gamePort;
|
||||
int controlPort;
|
||||
|
||||
ServerProperties(int _id, const QSslCertificate &_cert, const QString &_hostname, const QHostAddress &_address, int _gamePort, int _controlPort)
|
||||
: id(_id), cert(_cert), hostname(_hostname), address(_address), gamePort(_gamePort), controlPort(_controlPort) { }
|
||||
};
|
||||
|
||||
class Servatrice : public Server
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -85,6 +100,7 @@ public:
|
|||
int getMaxGamesPerUser() const { return maxGamesPerUser; }
|
||||
bool getThreaded() const { return threaded; }
|
||||
QString getDbPrefix() const { return dbPrefix; }
|
||||
int getServerId() const { return serverId; }
|
||||
void updateLoginMessage();
|
||||
ServerInfo_User getUserData(const QString &name, bool withId = false);
|
||||
int getUsersWithAddress(const QHostAddress &address) const;
|
||||
|
|
@ -98,11 +114,21 @@ public:
|
|||
void incRxBytes(quint64 num);
|
||||
int getUserIdInDB(const QString &name);
|
||||
void storeGameInformation(int secondsElapsed, const QSet<QString> &allPlayersEver, const QSet<QString> &allSpectatorsEver, const QList<GameReplay *> &replays);
|
||||
|
||||
void addNetworkServerInterface(NetworkServerInterface *interface);
|
||||
void removeNetworkServerInterface(NetworkServerInterface *interface);
|
||||
|
||||
QList<ServerProperties> getServerList() const;
|
||||
protected:
|
||||
int startSession(const QString &userName, const QString &address);
|
||||
void endSession(int sessionId);
|
||||
bool userExists(const QString &user);
|
||||
AuthenticationResult checkUserPassword(Server_ProtocolHandler *handler, const QString &user, const QString &password, QString &reasonStr);
|
||||
|
||||
void clearSessionTables();
|
||||
void lockSessionTables();
|
||||
void unlockSessionTables();
|
||||
bool userSessionExists(const QString &userName);
|
||||
private:
|
||||
enum AuthenticationMethod { AuthenticationNone, AuthenticationSql };
|
||||
enum DatabaseType { DatabaseNone, DatabaseMySql };
|
||||
|
|
@ -127,6 +153,12 @@ private:
|
|||
QString shutdownReason;
|
||||
int shutdownMinutes;
|
||||
QTimer *shutdownTimer;
|
||||
|
||||
mutable QMutex serverListMutex;
|
||||
QList<ServerProperties> serverList;
|
||||
void updateServerList();
|
||||
|
||||
QList<NetworkServerInterface *> networkServerInterfaces;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,16 +31,16 @@ ServerLogger::~ServerLogger()
|
|||
flushBuffer();
|
||||
}
|
||||
|
||||
void ServerLogger::logMessage(QString message, Server_ProtocolHandler *ssi)
|
||||
void ServerLogger::logMessage(QString message, void *caller)
|
||||
{
|
||||
if (!logFile)
|
||||
return;
|
||||
|
||||
bufferMutex.lock();
|
||||
QString ssiString;
|
||||
if (ssi)
|
||||
ssiString = QString::number((qulonglong) ssi, 16) + " ";
|
||||
buffer.append(QDateTime::currentDateTime().toString() + " " + QString::number((qulonglong) QThread::currentThread(), 16) + " " + ssiString + message);
|
||||
QString callerString;
|
||||
if (caller)
|
||||
callerString = QString::number((qulonglong) caller, 16) + " ";
|
||||
buffer.append(QDateTime::currentDateTime().toString() + " " + QString::number((qulonglong) QThread::currentThread(), 16) + " " + callerString + message);
|
||||
bufferMutex.unlock();
|
||||
|
||||
emit sigFlushBuffer();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public:
|
|||
~ServerLogger();
|
||||
static void hupSignalHandler(int unused);
|
||||
public slots:
|
||||
void logMessage(QString message, Server_ProtocolHandler *ssi = 0);
|
||||
void logMessage(QString message, void *caller = 0);
|
||||
private slots:
|
||||
void handleSigHup();
|
||||
void flushBuffer();
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ ServerSocketInterface::ServerSocketInterface(Servatrice *_server, QTcpSocket *_s
|
|||
connect(socket, SIGNAL(disconnected()), this, SLOT(deleteLater()));
|
||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(catchSocketError(QAbstractSocket::SocketError)));
|
||||
connect(this, SIGNAL(outputBufferChanged()), this, SLOT(flushOutputBuffer()), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(logDebugMessage(const QString &, Server_ProtocolHandler *)), logger, SLOT(logMessage(QString, Server_ProtocolHandler *)));
|
||||
|
||||
Event_ServerIdentification identEvent;
|
||||
identEvent.set_server_name(servatrice->getServerName().toStdString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue