|
Entropic 2.14.3
Local-first agentic inference engine
|
Streamable-HTTP front end for an ExternalBridge (gh#204). More...
#include </home/runner/work/entropic/entropic/src/facade/http_listener.h>
Classes | |
| struct | Impl |
| httplib state, kept out of the header (no third-party headers). More... | |
Public Member Functions | |
| HttpListener (ExternalBridge *bridge, int port) | |
Bind to 127.0.0.1:port on start(); 0 picks a free port. | |
| ~HttpListener () | |
| Stops the server and removes the token file. | |
| HttpListener (const HttpListener &)=delete | |
| HttpListener & | operator= (const HttpListener &)=delete |
| bool | start (std::string &err) |
| Write the token, bind, and start serving. | |
| void | stop () |
| Stop serving and remove the token file. | |
| int | port () const |
| The port actually bound. | |
| const std::filesystem::path & | token_file () const |
| Where this listener's token was written. | |
Streamable-HTTP front end for an ExternalBridge (gh#204).
Owns the listening socket, the server thread and the token file. Does not own the bridge, which must outlive it.
@dg_internal
Definition at line 172 of file http_listener.h.
| entropic::http::HttpListener::HttpListener | ( | ExternalBridge * | bridge, |
| int | port | ||
| ) |
Bind to 127.0.0.1:port on start(); 0 picks a free port.
| bridge | Bridge to dispatch to (not owned). |
| port | Port; 0 = any free port (tests). |
Definition at line 399 of file http_listener.cpp.
| entropic::http::HttpListener::~HttpListener | ( | ) |
Stops the server and removes the token file.
Stop the server and remove the token file.
@req REQ-BRIDGE-001
Definition at line 407 of file http_listener.cpp.
|
inline |
The port actually bound.
Definition at line 207 of file http_listener.h.
| bool entropic::http::HttpListener::start | ( | std::string & | err | ) |
Write the token, bind, and start serving.
| [out] | err | Why it could not start. |
| [out] | err | Why it could not start. |
Definition at line 482 of file http_listener.cpp.
| void entropic::http::HttpListener::stop | ( | ) |
Stop serving and remove the token file.
Idempotent.
Idempotent. @req REQ-BRIDGE-001
Definition at line 534 of file http_listener.cpp.
|
inline |
Where this listener's token was written.
Definition at line 214 of file http_listener.h.