Skip to content

HttpServer: add the AbstractHttpServer interface - #1884

Merged
Mysticial merged 1 commit into
mainfrom
extract-abstract-http-server
Nov 11, 2026
Merged

Mysticial merged 1 commit into
mainfrom
extract-abstract-http-server

Conversation

@pa-devbot

Copy link
Copy Markdown
Collaborator

Adds Common/Cpp/HttpServer/AbstractHttpServer.h — the interface of the in-app HTTP server: the Request/Response value types, the Handler contract (+ HandlerContext::connection_alive() for cancelling long-running work), the Listener lifecycle events (on_listen_finished / on_connect / on_connect_rejected / on_disconnect), and the start() / stop() / is_running() lifecycle.

Header-only, transport-free: the concrete HttpServer on AbstractServerSocket lands in the stacked PR and implements this interface. Keeping the contract separate from the socket-based implementation means the MCP layer (and any alternative transport, e.g. a stdio bridge) can depend on the interface only.

First of the new stack for the in-app MCP server groundwork; the ServerSocket factory alias already landed in main (#1878).

The request/response types, the handler contract, and the lifecycle
events of the in-app HTTP server, as a standalone abstract class with
no transport behind it. The concrete HttpServer (on AbstractServerSocket)
lands in a follow-up PR that stacks on this one.

Part of the groundwork for the in-app MCP server: keeping the interface
separate from the socket-based implementation means the MCP layer (and
any alternative transport) can depend on the contract only.
@Mysticial
Mysticial merged commit 6c778f3 into main Nov 11, 2026
8 checks passed
@Mysticial
Mysticial deleted the extract-abstract-http-server branch November 11, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants