server code cleanup, changed in-game ping event to not use any bandwidth as long as nothing changes

This commit is contained in:
Max-Wilhelm Bruker
2012-01-29 13:36:43 +01:00
parent a64df4a0f5
commit 4895f2b4fd
27 changed files with 232 additions and 268 deletions

View File

@@ -57,6 +57,7 @@ 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());
@@ -125,7 +126,6 @@ void ServerSocketInterface::readClient()
CommandContainer newCommandContainer;
newCommandContainer.ParseFromArray(inputBuffer.data(), messageLength);
logger->logMessage(QString::fromStdString(newCommandContainer.ShortDebugString()), this);
inputBuffer.remove(0, messageLength);
messageInProgress = false;