mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -07:00
Implementation of websockets in servatrice and test js client
This commit is contained in:
parent
e81a6d497b
commit
5b21dc8cde
42 changed files with 39592 additions and 287 deletions
|
|
@ -44,10 +44,9 @@ private slots:
|
|||
void broadcastRoomUpdate(const ServerInfo_Room &roomInfo, bool sendToIsl = false);
|
||||
public:
|
||||
mutable QReadWriteLock clientsLock, roomsLock; // locking order: roomsLock before clientsLock
|
||||
Server(bool _threaded, QObject *parent = 0);
|
||||
Server(QObject *parent = 0);
|
||||
~Server();
|
||||
void setThreaded(bool _threaded) { threaded = _threaded; }
|
||||
AuthenticationResult loginUser(Server_ProtocolHandler *session, QString &name, const QString &password, QString &reason, int &secondsLeft, QString &clientid, QString &clientVersion);
|
||||
AuthenticationResult loginUser(Server_ProtocolHandler *session, QString &name, const QString &password, QString &reason, int &secondsLeft, QString &clientid, QString &clientVersion, QString &connectionType);
|
||||
|
||||
const QMap<int, Server_Room *> &getRooms() { return rooms; }
|
||||
|
||||
|
|
@ -73,8 +72,6 @@ public:
|
|||
virtual int getCommandCountingInterval() const { return 0; }
|
||||
virtual int getMaxCommandCountPerInterval() const { return 0; }
|
||||
|
||||
virtual bool getThreaded() const { return false; }
|
||||
|
||||
Server_DatabaseInterface *getDatabaseInterface() const;
|
||||
int getNextLocalGameId() { QMutexLocker locker(&nextLocalGameIdMutex); return ++nextLocalGameId; }
|
||||
|
||||
|
|
@ -93,7 +90,6 @@ public:
|
|||
void removePersistentPlayer(const QString &userName, int roomId, int gameId, int playerId);
|
||||
QList<PlayerReference> getPersistentPlayerReferences(const QString &userName) const;
|
||||
private:
|
||||
bool threaded;
|
||||
QMultiMap<QString, PlayerReference> persistentPlayers;
|
||||
mutable QReadWriteLock persistentPlayersLock;
|
||||
int nextLocalGameId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue