Files
amnezia-client/client/platforms/macos/macospingsender.h
T

31 lines
730 B
C++
Raw Normal View History

2021-10-23 04:26:47 -07:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MACOSPINGSENDER_H
#define MACOSPINGSENDER_H
#include "pingsender.h"
class QSocketNotifier;
class MacOSPingSender final : public PingSender {
Q_OBJECT
Q_DISABLE_COPY_MOVE(MacOSPingSender)
public:
2023-07-15 14:19:48 -07:00
MacOSPingSender(const QHostAddress& source, QObject* parent = nullptr);
2021-10-23 04:26:47 -07:00
~MacOSPingSender();
2023-07-15 14:19:48 -07:00
void sendPing(const QHostAddress& dest, quint16 sequence) override;
2021-10-23 04:26:47 -07:00
private slots:
void socketReady();
private:
QSocketNotifier* m_notifier = nullptr;
int m_socket = -1;
};
#endif // MACOSPINGSENDER_H