From a453e47041ab17f4e965a48e6e55cfaab35b124c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 20 May 2018 15:14:45 +0300 Subject: [PATCH] Removed func "addContact" (it's will be added in the future) and added private func "sendPing". --- src/contactmanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/contactmanager.cpp b/src/contactmanager.cpp index 80ff09a..64baeaa 100644 --- a/src/contactmanager.cpp +++ b/src/contactmanager.cpp @@ -1,6 +1,10 @@ #include "contactmanager.h" -ContactManager::addContact() +ContactManager::sendPing(QHostAddress ip) { - + json ping; + ping["peerID"] = QHostAddress::AnyIPv6.toString(); + ping["action"] = "ping"; + QString str = ping.dump(); + send(str, ip); }