The way of obtaining IPv6 is changed.

This commit is contained in:
Denis Davydov 2018-06-22 15:07:53 +03:00
parent fd20de0e38
commit aac8567528
2 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,7 @@ void Handler::handle(QJsonObject jsonReceived)
QJsonObject jsonSend;
if(jsonReceived["action"] == "createSession" && !jsonReceived.contains("status"))
{
jsonSend["peerID"] = QHostAddress("fc8f:cc50:70b0:3731:d686:a75e:94f2:f44f").toString();
jsonSend["peerID"] = my_ipv6;
jsonSend["action"] = "createSession";
jsonSend["status"] = true;
QString peerReceiver = jsonReceived["peerID"].toString();

View File

@ -7,6 +7,8 @@ class Handler : public QObject
{
Q_OBJECT
const QString my_ipv6 = Network::local_ipv6();
public:
Handler();
signals:
@ -15,4 +17,6 @@ class Handler : public QObject
Network *network;
private slots:
void handle(QJsonObject jsonReceived);
};