EntropyCanvas::CanvasDiscovery
EntropyCanvas::CanvasDiscovery
Section titled “EntropyCanvas::CanvasDiscovery”CanvasDiscovery - Utility for finding CanvasEngine instances. More…
#include <CanvasDiscovery.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| bool | probe(const std::string & endpoint) Check if a specific endpoint has an active CanvasEngine. |
| std::vector< std::string > | getWellKnownPaths() Get all well-known local endpoints to check. |
| std::string | getDefaultEndpoint() Get the default local endpoint for the current platform. |
| std::vector< DiscoveredCanvas > | findLocal() Find all local CanvasEngine instances. |
Detailed Description
Section titled “Detailed Description”class EntropyCanvas::CanvasDiscovery;CanvasDiscovery - Utility for finding CanvasEngine instances.
Provides static methods to discover local CanvasEngine servers using well-known socket paths.
Platform-specific paths:
- macOS/Linux: /tmp/canvasengine.sock, $XDG_RUNTIME_DIR/canvasengine/
- Windows: .\pipe\canvasengine
Usage:
auto instances = CanvasDiscovery::findLocal();if (!instances.empty()) { client.connect(instances[0].endpoint);}Public Functions Documentation
Section titled “Public Functions Documentation”function probe
Section titled “function probe”static bool probe( const std::string & endpoint)Check if a specific endpoint has an active CanvasEngine.
Parameters:
- endpoint Socket path or URL to probe
Return: true if a CanvasEngine responds at the endpoint
Attempts a brief connection to verify the server is running.
function getWellKnownPaths
Section titled “function getWellKnownPaths”static std::vector< std::string > getWellKnownPaths()Get all well-known local endpoints to check.
Return: List of paths that might contain CanvasEngine sockets
function getDefaultEndpoint
Section titled “function getDefaultEndpoint”static std::string getDefaultEndpoint()Get the default local endpoint for the current platform.
Return: Platform-appropriate socket path
function findLocal
Section titled “function findLocal”static std::vector< DiscoveredCanvas > findLocal()Find all local CanvasEngine instances.
Return: Vector of discovered instances
Checks well-known paths for active sockets/pipes.
Updated on 2026-01-26 at 17:14:35 -0500