Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
SondeTest::SseStream Class Reference

An open server-sent-events stream (GET /mcp). More...

#include <testsupport.h>

Public Member Functions

 SseStream (quint16 port, const QByteArray &session)
 Opens the stream for session on port.
int waitForStatus (int timeoutMs=3000)
 Waits for the response head; returns the status code.
bool waitForMessage (const QString &method, int timeoutMs=3000)
 Waits until a message with method has arrived.
const QList< QJsonObject > & messages () const
 Messages received so far.
bool isClosed () const
 Whether the server closed the stream.

Private Member Functions

void onReadyRead ()
 Parses received SSE data.

Private Attributes

QTcpSocket m_socket
 Stream connection.
QByteArray m_buffer
 Received bytes not yet parsed.
int m_status = 0
 Response status, 0 until the head arrives.
QList< QJsonObject > m_messages
 Parsed data: payloads.

Detailed Description

An open server-sent-events stream (GET /mcp).


The documentation for this class was generated from the following files: