Skip to content

Class: BarClient

Defined in: core.ts:114

The remote's endpoint: joins a host, renders its projected bar, and sends taps back. It holds no mode engine — the host's is the only one, and this is a view of it (the panel is a view too). A tap is a command, the identical verb a key or the agent would dispatch.

Constructors

Constructor

new BarClient(opts): BarClient

Defined in: core.ts:115

Parameters

opts

BarClientOptions

Returns

BarClient

Methods

dispatch()

dispatch(command, payload?): void

Defined in: core.ts:128

Tap a bar cap — the same command a key, or the agent, would dispatch.

Parameters

command

string

payload?

unknown

Returns

void


join()

join(host): void

Defined in: core.ts:118

Join a host's room by its relay-assigned id.

Parameters

host

string

Returns

void


leave()

leave(): void

Defined in: core.ts:123

Leave the current room (stay connected to the relay for the session list).

Returns

void


receive()

receive(message): void

Defined in: core.ts:132

Parameters

message

RelayToClient

Returns

void