mirror of
https://github.com/ChronosX88/Influence-cjdns.git
synced 2024-11-08 08:51:00 +00:00
Removed func "sendPing" from class Network and moved to class
ContactManager.
This commit is contained in:
parent
aaea262861
commit
585c4d9e77
@ -8,13 +8,6 @@ class Network
|
||||
socket->bind(QHostAddress::AnyIPv6, 6552);
|
||||
connect(socket, SIGNAL(readyRead()), SLOT(read()));
|
||||
}
|
||||
void sendPing(QHostAddress ip)
|
||||
{
|
||||
json ping;
|
||||
ping["action"] = "ping";
|
||||
QString str = ping.dump();
|
||||
send(str, ip);
|
||||
}
|
||||
void send(QString str, QHostAddress ip)
|
||||
{
|
||||
QByteArray data;
|
||||
@ -25,7 +18,7 @@ class Network
|
||||
out << qint64(data.size() - sizeof(qint64));
|
||||
socket->writeDatagram(data, QHostAddress(ip), 6552);
|
||||
}
|
||||
void readyRead()
|
||||
void read()
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.resize(socket->pendingDatagramSize());
|
||||
|
Loading…
Reference in New Issue
Block a user