AusweisApp2
Lade ...
Suche ...
Keine Treffer
WebSocketChannel.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "DataChannel.h"
12
13#include <QByteArray>
14#include <QObject>
15#include <QTimer>
16#include <QWebSocket>
17
18namespace governikus
19{
21 : public DataChannel
22{
23 Q_OBJECT
24
25 private:
26 const QSharedPointer<QWebSocket> mConnection;
27 const QString mId;
28 QTimer mPingTimer;
29 QTimer mPongTimer;
30 static QString makeConnectionId(const QSharedPointer<QWebSocket>& pConnection);
31
32 public:
33 explicit WebSocketChannel(const QSharedPointer<QWebSocket>& pConnection);
34 ~WebSocketChannel() override;
35
36 void send(const QByteArray& pDataBlock) override;
37 void close() override;
38 [[nodiscard]] const QString& getId() const override;
39
40 private Q_SLOTS:
41 void onReceived(const QString& pMessage);
42 void onDisconnected();
43 void onPingScheduled();
44 void onPongReceived();
45 void onPongTimeout();
46};
47
48} // namespace governikus
Definition: DataChannel.h:21
Definition: WebSocketChannel.h:22
~WebSocketChannel() override
Definition: WebSocketChannel.cpp:58
void send(const QByteArray &pDataBlock) override
Definition: WebSocketChannel.cpp:71
void close() override
Definition: WebSocketChannel.cpp:80
const QString & getId() const override
Definition: WebSocketChannel.cpp:97
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16