Class StreamProxy
Defined in File stream_proxy.hpp
Inheritance Relationships
Derived Type
public ros2_medkit_gateway::SSEStreamProxy(Class SSEStreamProxy)
Class Documentation
-
class StreamProxy
Transport-agnostic interface for proxying streaming connections.
StreamProxy abstracts the transport layer for streaming event connections to peer gateways. Currently implemented with SSE, but the interface allows future implementations using WebSocket or gRPC streams.
Usage: proxy->on_event([](const StreamEvent& e) { handle(e); }); proxy->open(); // … events flow via callback … proxy->close();
Subclassed by ros2_medkit_gateway::SSEStreamProxy
Public Functions
-
virtual ~StreamProxy() = default
-
virtual void open() = 0
Start the streaming connection (non-blocking, spawns reader thread)
-
virtual void close() = 0
Stop the streaming connection and join the reader thread.
-
virtual bool is_connected() const = 0
Check if the streaming connection is currently active.
-
virtual void on_event(std::function<void(const StreamEvent&)> cb) = 0
Register a callback for incoming stream events.
-
virtual ~StreamProxy() = default