AusweisApp
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{
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:
34 ~WebSocketChannel() override;
35
36 void send(const QByteArray& pDataBlock) override;
37 void close() override;
38 [[nodiscard]] bool isPairingConnection() const override;
39 [[nodiscard]] const QString& getId() const override;
40
41 private Q_SLOTS:
42 void onReceived(const QString& pMessage);
43 void onDisconnected();
44 void onPingScheduled();
45 void onPongReceived();
46 void onPongTimeout();
47};
48
49} // namespace governikus
Definition DataChannel.h:21
Definition WebSocketChannel.h:22
~WebSocketChannel() override
Definition WebSocketChannel.cpp:61
void send(const QByteArray &pDataBlock) override
Definition WebSocketChannel.cpp:74
void close() override
Definition WebSocketChannel.cpp:83
WebSocketChannel(const QSharedPointer< QWebSocket > &pConnection)
Definition WebSocketChannel.cpp:38
const QString & getId() const override
Definition WebSocketChannel.cpp:107
bool isPairingConnection() const override
Definition WebSocketChannel.cpp:100
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114