ORE Studio Comms Component
Communications library providing client-server connectivity for ORE Studio.
Component Architecture
Diagram:
Implements a custom binary protocol over SSL/TLS for secure client-server communication. Key features:
- SSL/TLS security: All connections secured with OpenSSL
- Binary protocol: Frame-based message exchange with headers and payloads
- Server: Asynchronous multi-client server with session management
- Client: Thread-safe client with both sync and async APIs
- Handshake: Connection establishment with server/client identification
- Message dispatching: Pluggable message handlers by subsystem range
- Connection pooling: Maximum connection limits and active connection tracking
- Error handling: Comprehensive error codes and std::expected-based APIs
The protocol namespace defines message frames, types, handlers, and the message dispatcher that routes messages to registered subsystem handlers.
Connection Events
The client publishes connection lifecycle events to the ores.eventing event bus, enabling decoupled notification of connection state changes. This allows UI components (like system tray icons) to react to connection events without tight coupling to the client implementation.
Events published by the client:
| Event | When Published |
|---|---|
connected_event |
After successful connection and protocol handshake |
disconnected_event |
When connection is lost or explicitly closed |
reconnecting_event |
When auto-reconnect is triggered after disconnect |
reconnected_event |
After auto-reconnect successfully restores connection |
To receive events, consumers subscribe via the event bus:
auto sub = event_bus->subscribe<comms::domain::events::connected_event>( [](const auto& event) { // Handle connection established });
The client accepts an optional shared_ptr<event_bus> in its constructor. If
provided, events are published automatically during connection lifecycle
transitions. If null, no events are published (callbacks can still be used).
| Top: Documentation | Previous: System Model |
