Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
server.cpp File Reference

Server, and ServerPrivate's threads, sessions and notifications. More...

#include "instance_p.h"
#include "server_p.h"
#include "stackcapture_p.h"
#include "stalleventsource_p.h"
#include "threadcheck_p.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QUuid>
#include <algorithm>
#include <chrono>
#include <cmath>
#include <future>

Classes

struct  Sonde::anonymous_namespace{server.cpp}::HttpSetting
 Where a SONDE_HTTP value asks to listen: <port>, <host>:<port>, with {instance} in place of the port (designs 0018 and 0019). More...

Namespaces

namespace  Sonde
 Embeddable Model Context Protocol server for Qt applications.

Functions

bool Sonde::anonymous_namespace{server.cpp}::samplesOffByEnvironment ()
 Whether SONDE_STACK_SAMPLES turns stack samples off.
QHostAddress Sonde::anonymous_namespace{server.cpp}::httpHost (QString hostPart)
 The host part of a SONDE_HTTP value (127.0.0.1, with a warning, if it is invalid).
std::optional< HttpSetting > Sonde::anonymous_namespace{server.cpp}::httpSetting (const QString &value)
 Parses SONDE_HTTP's value, warning about what is wrong with it.

Variables

constexpr qint64 Sonde::kHeartbeatMs = 100
 Interval of the heartbeat on the server's thread (WorkerThread mode).
constexpr qint64 Sonde::kRespondingMs = 250
 app_status calls the main thread responding while its heartbeat is at most this late (the default threshold of the stalls source too).
constexpr int Sonde::kRecentStalls = 3
 How many recent stall events app_status shows.

Detailed Description

Server, and ServerPrivate's threads, sessions and notifications.

Dispatch is in dispatch.cpp, tool calls in toolcall.cpp.