#include <MRMCPGateway/MRMCPGatewayMlTransport.h>
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 |
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.
| MR::McpGateway::MLClientTransport::MLClientTransport | ( | const std::string & | targetUrl, |
| const std::string & | ssePath, | ||
| const std::string & | messagesPath ) |
| targetUrl | e.g. "http:/// 127.0.0.1:7887". Parsed once into host+port. |
|
override |
|
override |