G1 step 1: gemini get, and two TLS connections measured

`gemini get <url>` fetches on a short-lived task (a handshake would trip
the main loop's watchdog; an idle client should cost no stack) and
reports the header, size, certificate fingerprint and heap. First page:
geminiprotocol.net, 20 text/gemini, 1,184 bytes in 0.7-1.1 s.

With IRC connected over TLS, a fetch dips to about 24 KB free during its
handshake, about 36-40 KB after it; nothing leaks. Antenna is down, so
the default aggregator becomes Cosmos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-05 00:27:05 +02:00
co-authored by Claude Opus 5.5
parent dc9b0e14ce
commit 2d384f5cff
4 changed files with 137 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <string>
namespace roro {
// Gemini (docs/milestones/G1.md). Each fetch runs on a short-lived task of its own: a TLS
// handshake can block for seconds, which the main loop's watchdog wouldn't allow, and an idle
// client should cost no stack.
class GeminiService {
public:
// `gemini get <url>`: fetches and prints the header, size, certificate fingerprint, the first
// lines and the heap around the fetch to the console. False if a fetch is already running.
bool fetchToConsole(const std::string& url);
private:
static void consoleTask(void* arg);
volatile bool busy_ = false;
};
} // namespace roro