5#include <QtCore/QByteArray>
6#include <QtCore/QByteArrayView>
7#include <QtCore/QDateTime>
9#include <QtCore/QObject>
10#include <QtCore/QString>
49 bool write(
const QByteArray& bytes);
75 void _attach(QTcpSocket* socket);
76 void _verifyCertificate(QSslSocket* socket,
const QList<QSslError>& errors);
80 void _receive(QByteArrayView bytes, qint64 receivedAtMs,
const QDateTime& utcNow = QDateTime::currentDateTimeUtc());
84 void _finishResponse();
85 void _fail(
NTRIPError code,
const QString& message);
93 QTcpSocket* _socket =
nullptr;
95 QString _pinnedCertificate;
97 bool _allowSelfSignedCerts =
false;
98 bool _reading =
false;
Private transport parser; buffers framing, never correction payloads.
bool awaitingErrorBody() const
static constexpr qint64 READ_CHUNK_BYTES
void certificatePinned(const QString &pin)
A newly trusted self-signed certificate, as NTRIPConnectionConfig::pinnedCertificate; precedes the re...
static constexpr qint64 READ_BUFFER_BYTES
QString open(const NTRIPConnectionConfig &config)
bool awaitingErrorBody() const
An error status arrived and its body is still being read.
friend class NTRIPHttpTransportTest
static constexpr std::chrono::milliseconds ERROR_BODY_TIMEOUT
bool write(const QByteArray &bytes)
False unless the socket accepted every byte; the owner decides how to report it.
void finished()
The response ended where its HTTP framing allows.
void bodyReceived(const QByteArray &body, qint64 receivedAtMs)
Body bytes, with the scheduler time at which the bytes carrying them arrived.
void responseStarted()
The caster accepted the request; its body follows.
void abort()
Ends the connection without further signals.
friend class NTRIPHttpSessionTest
void failed(const NTRIPFailure &failure)
A socket, TLS or HTTP failure, including an error status with the caster's explanation.