|
Entropic 2.3.8
Local-first agentic inference engine
|
SSE transport: HTTP GET for event stream, POST for requests. More...
#include <entropic/mcp/transport_sse.h>


Public Member Functions | |
| SSETransport (std::string url, uint32_t default_timeout_ms=30000) | |
| Construct with SSE endpoint URL. | |
| ~SSETransport () override | |
| Destructor — ensures reader thread is stopped. | |
| bool | open () override |
| Connect to SSE endpoint and start reader thread. | |
| void | close () override |
| Stop SSE reader and close HTTP client. | |
| std::string | send_request (const std::string &request_json, uint32_t timeout_ms=0) override |
| POST a JSON-RPC request and wait for matching response. | |
| bool | is_connected () const override |
| Check if SSE stream is connected. | |
Public Member Functions inherited from entropic::Transport | |
| virtual void | interrupt () |
| Abort any in-flight send_request() call ASAP. | |
SSE transport: HTTP GET for event stream, POST for requests.
Background thread reads SSE events; data fields parsed as JSON-RPC responses and matched to pending requests by id. send_request() POSTs the request and waits on a condition variable for the response.
Definition at line 39 of file transport_sse.h.
|
explicit |
Construct with SSE endpoint URL.
| url | SSE endpoint (e.g., "http://127.0.0.1:6277/sse"). |
| default_timeout_ms | Default timeout for send_request. |
| url | SSE endpoint URL. |
| default_timeout_ms | Default request timeout. |
Definition at line 27 of file transport_sse.cpp.
|
override |
Destructor — ensures reader thread is stopped.
Definition at line 38 of file transport_sse.cpp.
|
overridevirtual |
Stop SSE reader and close HTTP client.
Implements entropic::Transport.
Definition at line 127 of file transport_sse.cpp.
|
overridevirtual |
Check if SSE stream is connected.
Implements entropic::Transport.
Definition at line 254 of file transport_sse.cpp.
|
overridevirtual |
Connect to SSE endpoint and start reader thread.
Implements entropic::Transport.
Definition at line 90 of file transport_sse.cpp.
|
overridevirtual |
POST a JSON-RPC request and wait for matching response.
| request_json | JSON-RPC request string. |
| timeout_ms | Timeout (0 = default). |
| request_json | JSON-RPC request string. |
| timeout_ms | Timeout (0 = default). |
Implements entropic::Transport.
Definition at line 229 of file transport_sse.cpp.