cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::RunningService< RoleServer > Class Reference

Running server-side MCP service. More...

#include <service.hpp>

Public Member Functions

 RunningService (ServerPeer peer)
 
 RunningService (ServerPeer peer, std::unique_ptr< transport::ServerTransport > transport, server::SessionContext context={})
 
 RunningService (const RunningService &)=delete
 
RunningServiceoperator= (const RunningService &)=delete
 
 RunningService (RunningService &&other) noexcept
 
RunningServiceoperator= (RunningService &&other) noexcept
 
ServerPeerpeer () noexcept
 
const ServerPeerpeer () const noexcept
 
void wait_until_ready ()
 Blocks until the server is ready to accept connections.
 
bool running () const noexcept
 
CancellationToken cancellation_token () const noexcept
 Returns the service cancellation token.
 
core::Result< core::Unitclose () noexcept
 Explicitly closes the running service.
 
core::Result< core::Unitwait () noexcept
 Waits for service shutdown.
 
core::Result< core::Unitstop () noexcept
 

Detailed Description

Running server-side MCP service.

Member Function Documentation

◆ wait()

core::Result< core::Unit > mcp::RunningService< RoleServer >::wait ( )
inlinenoexcept

Waits for service shutdown.

Blocks until close() or stop() completes.

◆ wait_until_ready()

void mcp::RunningService< RoleServer >::wait_until_ready ( )
inline

Blocks until the server is ready to accept connections.

For HTTP transports, this waits until the listening socket is bound. For other transports, returns immediately.


The documentation for this class was generated from the following file: