mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
server code cleanup, changed in-game ping event to not use any bandwidth as long as nothing changes
This commit is contained in:
parent
a64df4a0f5
commit
4895f2b4fd
27 changed files with 232 additions and 268 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue