Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::Transport Class Referenceabstract

Abstract transport for external MCP communication. More...

#include <entropic/mcp/transport.h>

Inheritance diagram for entropic::Transport:

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.
 

Detailed Description

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).

Version
1.8.7

Definition at line 29 of file transport.h.

Member Function Documentation

◆ close()

virtual void entropic::Transport::close ( )
pure virtual

Close the transport connection.

Version
1.8.7

Implemented in entropic::SSETransport, and entropic::StdioTransport.

◆ interrupt()

virtual void entropic::Transport::interrupt ( )
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

Version
2.0.6-rc16

Reimplemented in entropic::StdioTransport.

Definition at line 76 of file transport.h.

◆ is_connected()

virtual bool entropic::Transport::is_connected ( ) const
pure virtual

Check if transport is connected.

Returns
true if connected and ready.
Version
1.8.7

Implemented in entropic::SSETransport, and entropic::StdioTransport.

◆ open()

virtual bool entropic::Transport::open ( )
pure virtual

Open the transport connection.

Returns
true on success.
Version
1.8.7

Implemented in entropic::SSETransport, and entropic::StdioTransport.

◆ send_request()

virtual std::string entropic::Transport::send_request ( const std::string &  request_json,
uint32_t  timeout_ms = 0 
)
pure virtual

Send a JSON-RPC request and wait for response.

Parameters
request_jsonJSON-RPC request string.
timeout_msTimeout in milliseconds (0 = default 30s).
Returns
JSON-RPC response string, or empty on error/timeout.
Version
1.8.7

Implemented in entropic::SSETransport, and entropic::StdioTransport.


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