mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
run socket code in thread
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#include <QTcpSocket>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QFuture>
|
||||
|
||||
#include <Exception.h>
|
||||
|
||||
@ -19,8 +20,8 @@ class McClient : public QObject {
|
||||
|
||||
public:
|
||||
explicit McClient(QObject *parent, QString domain, QString ip, short port);
|
||||
QJsonObject getStatusData();
|
||||
int getOnlinePlayers();
|
||||
QJsonObject getStatusDataBlocking();
|
||||
QFuture<int> getOnlinePlayers();
|
||||
void sendRequest();
|
||||
void readBytesExactFromSocket(QByteArray &resp, int bytesToRead);
|
||||
QJsonObject readResponse();
|
||||
|
Reference in New Issue
Block a user