|
cxxmcp 1.1.6
C++ MCP SDK
|
Service lifecycle boundary for role-aware MCP peers. More...
#include <condition_variable>#include <memory>#include <mutex>#include <optional>#include <thread>#include <utility>#include "cxxmcp/cancellation.hpp"#include "cxxmcp/peer.hpp"Go to the source code of this file.
Classes | |
| struct | mcp::detail::ServiceLifecycleState |
| class | mcp::RunningService< RoleClient > |
| Running client-side MCP service. More... | |
| class | mcp::RunningService< RoleServer > |
| Running server-side MCP service. More... | |
| class | mcp::Service< RoleClient > |
| Client-side MCP service ready to be served. More... | |
| class | mcp::Service< RoleServer > |
| Server-side MCP service ready to be served. More... | |
Functions | |
| bool | mcp::detail::service_running (const std::shared_ptr< ServiceLifecycleState > &state) noexcept |
| CancellationToken | mcp::detail::service_cancellation_token (const std::shared_ptr< ServiceLifecycleState > &state) noexcept |
| template<class Stop > | |
| core::Result< core::Unit > | mcp::detail::stop_service (const std::shared_ptr< ServiceLifecycleState > &state, Stop stop) noexcept |
| core::Result< core::Unit > | mcp::detail::wait_service (const std::shared_ptr< ServiceLifecycleState > &state) noexcept |
| void | mcp::detail::finish_service (const std::shared_ptr< ServiceLifecycleState > &state, std::optional< core::Error > failure={}) noexcept |
| Service< RoleClient > | mcp::make_service (ClientPeer peer) |
| Creates a client service from a role-aware peer. | |
| Service< RoleServer > | mcp::make_service (ServerPeer peer) |
| Creates a server service from a role-aware peer. | |
| Service< RoleServer > | mcp::make_service (ServerPeer peer, std::unique_ptr< transport::ServerTransport > transport, server::SessionContext context={}) |
| Creates a server service that is driven by a role-generic transport. | |
| core::Result< RunningService< RoleClient > > | mcp::serve (ClientPeer peer) |
| Starts a client service and returns its running handle. | |
| core::Result< RunningService< RoleServer > > | mcp::serve (ServerPeer peer) |
| Starts a server service and returns its running handle. | |
| core::Result< RunningService< RoleServer > > | mcp::serve (ServerPeer peer, std::unique_ptr< transport::ServerTransport > transport, server::SessionContext context={}) |
| Starts a server service over a role-generic transport. | |
Service lifecycle boundary for role-aware MCP peers.
This header provides a small synchronous lifecycle layer that mirrors RMCP's service-oriented public shape without introducing an async runtime yet.
Lifecycle contract: