MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::McpGateway::MLClientTransport Class Referencefinal

#include <MRMCPGateway/MRMCPGatewayMlTransport.h>

Inheritance diagram for MR::McpGateway::MLClientTransport:

Public Member Functions

 MLClientTransport (const std::string &targetUrl, const std::string &ssePath, const std::string &messagesPath)
 ~MLClientTransport () override
fastmcpp::Json request (const std::string &route, const fastmcpp::Json &payload) override

Detailed Description

fastmcpp transport that talks to a MeshLib-based MCP server using one persistent SSE session for liveness/session-id tracking and a plain POST per request, reading the JSON-RPC response from the POST body.

Sidesteps fastmcpp's per-call SseClientTransport pattern, whose destructor blocks up to one heartbeat interval (~15 s) per call to join the listener thread. Auto-reconnects on backend restart via httplib::sse::SSEClient.

Constructor & Destructor Documentation

◆ MLClientTransport()

MR::McpGateway::MLClientTransport::MLClientTransport ( const std::string & targetUrl,
const std::string & ssePath,
const std::string & messagesPath )
Parameters
targetUrle.g. "http:/// 127.0.0.1:7887". Parsed once into host+port.

◆ ~MLClientTransport()

MR::McpGateway::MLClientTransport::~MLClientTransport ( )
override

Member Function Documentation

◆ request()

fastmcpp::Json MR::McpGateway::MLClientTransport::request ( const std::string & route,
const fastmcpp::Json & payload )
override

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