|
Entropic 2.3.8
Local-first agentic inference engine
|
Abstract transport for external MCP communication. More...
#include <entropic/mcp/transport.h>

Public Member Functions | |
| virtual bool | open ()=0 |
| Open the transport connection. | |
| virtual void | close ()=0 |
| Close the transport connection. | |
| virtual std::string | send_request (const std::string &request_json, uint32_t timeout_ms=0)=0 |
| Send a JSON-RPC request and wait for response. | |
| virtual bool | is_connected () const =0 |
| Check if transport is connected. | |
| virtual void | interrupt () |
| Abort any in-flight send_request() call ASAP. | |
Abstract transport for external MCP communication.
Internal to librentropic-mcp.so. Not exposed across .so boundaries. Two implementations: StdioTransport (fork/exec + pipes) and SSETransport (cpp-httplib SSE stream + HTTP POST).
Definition at line 29 of file transport.h.
|
pure virtual |
Close the transport connection.
Implemented in entropic::SSETransport, and entropic::StdioTransport.
|
inlinevirtual |
Abort any in-flight send_request() call ASAP.
Called from another thread (typically the engine's interrupt path) so tool dispatches to external MCP servers do not run to completion after Ctrl+C. Default is a no-op for transports with no blocking calls. Must wake pending reads within ~100ms. (P1-10, 2.0.6-rc16)
@utility
Reimplemented in entropic::StdioTransport.
Definition at line 76 of file transport.h.
|
pure virtual |
Check if transport is connected.
Implemented in entropic::SSETransport, and entropic::StdioTransport.
|
pure virtual |
Open the transport connection.
Implemented in entropic::SSETransport, and entropic::StdioTransport.
|
pure virtual |
Send a JSON-RPC request and wait for response.
| request_json | JSON-RPC request string. |
| timeout_ms | Timeout in milliseconds (0 = default 30s). |
Implemented in entropic::SSETransport, and entropic::StdioTransport.