mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
cleanups, games work with ISL, now we just need to clean up better when the ISL connection dies
This commit is contained in:
parent
c9a8429044
commit
5db0fcd6ae
28 changed files with 570 additions and 245 deletions
|
|
@ -3,13 +3,14 @@
|
|||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QDateTime>
|
||||
#include <iostream>
|
||||
#ifdef Q_OS_UNIX
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
ServerLogger::ServerLogger(QObject *parent)
|
||||
: QObject(parent), flushRunning(false)
|
||||
ServerLogger::ServerLogger(bool _logToConsole, QObject *parent)
|
||||
: QObject(parent), logToConsole(_logToConsole), flushRunning(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -71,6 +72,9 @@ void ServerLogger::flushBuffer()
|
|||
|
||||
stream << message << "\n";
|
||||
stream.flush();
|
||||
|
||||
if (logToConsole)
|
||||
std::cout << message.toStdString() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue