cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
adapters.hpp File Reference

Small adapter helpers for custom role-generic transports. More...

#include <condition_variable>
#include <cstddef>
#include <deque>
#include <functional>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include "cxxmcp/protocol/serialization.hpp"
#include "cxxmcp/transport/transport.hpp"

Go to the source code of this file.

Classes

struct  mcp::transport::FunctionTransportOptions< Role >
 Function-backed implementation of Transport<Role>. More...
 
class  mcp::transport::FunctionTransport< Role >
 Transport adapter for applications that already have send/receive callables. More...
 
struct  mcp::transport::JsonLineTransportOptions< Role >
 Line-oriented JSON-RPC source/sink adapter options. More...
 
class  mcp::transport::JsonLineTransport< Role >
 Adapter for transports that expose newline-delimited JSON strings. More...
 
struct  mcp::transport::QueueTransportOptions< Role >
 Options for an in-memory queue-backed transport. More...
 
class  mcp::transport::QueueTransport< Role >
 Thread-safe queue transport for worker/queue integrations and tests. More...
 

Typedefs

using mcp::transport::ClientFunctionTransport = FunctionTransport< RoleClient >
 
using mcp::transport::ServerFunctionTransport = FunctionTransport< RoleServer >
 
using mcp::transport::ClientJsonLineTransport = JsonLineTransport< RoleClient >
 
using mcp::transport::ServerJsonLineTransport = JsonLineTransport< RoleServer >
 
using mcp::transport::ClientQueueTransport = QueueTransport< RoleClient >
 
using mcp::transport::ServerQueueTransport = QueueTransport< RoleServer >
 

Functions

core::Error mcp::transport::transport_adapter_error (protocol::ErrorCode code, std::string message)
 
template<class Role >
std::unique_ptr< Transport< Role > > mcp::transport::make_function_transport (FunctionTransportOptions< Role > options)
 Creates a function-backed role-generic transport.
 
template<class Role >
std::unique_ptr< Transport< Role > > mcp::transport::make_json_line_transport (JsonLineTransportOptions< Role > options)
 Creates a line-oriented JSON-RPC transport.
 

Detailed Description

Small adapter helpers for custom role-generic transports.