Repository navigation
HttpServer: add the AbstractHttpServer interface - #1884
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Common/Cpp/HttpServer/AbstractHttpServer.h— the interface of the in-app HTTP server: theRequest/Responsevalue types, theHandlercontract (+HandlerContext::connection_alive()for cancelling long-running work), theListenerlifecycle events (on_listen_finished/on_connect/on_connect_rejected/on_disconnect), and thestart()/stop()/is_running()lifecycle.Header-only, transport-free: the concrete
HttpServeronAbstractServerSocketlands 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
ServerSocketfactory alias already landed in main (#1878).