NAME
Chandra::Socket::Client - IPC client for connecting to a Chandra Hub
SYNOPSIS
use Chandra::App;
use Chandra::Socket::Client;
my $app = Chandra::App->new(title => 'Display', width => 600, height => 400);
my $client = $app->client(
name => 'window-1',
hub => 'myapp',
);
$client->on('navigate', sub {
my ($data) = @_;
$app->navigate($data->{path});
});
$client->send('status_update', { status => 'ready' });
$app->run;
DESCRIPTION
Client connects to a Hub server via Unix domain socket (default) or TCP. It identifies itself via a handshake message and can send/receive messages on named channels.