Skip to content

EntropyCanvas::CanvasDiscovery

CanvasDiscovery - Utility for finding CanvasEngine instances. More…

#include <CanvasDiscovery.h>

Name
boolprobe(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::stringgetDefaultEndpoint()
Get the default local endpoint for the current platform.
std::vector< DiscoveredCanvas >findLocal()
Find all local CanvasEngine instances.
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);
}
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.

static std::vector< std::string > getWellKnownPaths()

Get all well-known local endpoints to check.

Return: List of paths that might contain CanvasEngine sockets

static std::string getDefaultEndpoint()

Get the default local endpoint for the current platform.

Return: Platform-appropriate socket path

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