Interface: Mesh
Defined in: packages/core/src/network/mesh.ts:69
Methods
iceServers()
iceServers(): Promise<readonly RTCIceServer[]>;Defined in: packages/core/src/network/mesh.ts:81
The ICE servers for a WebRTC connection of the application's own: the configured ones, and fresh TURN from a relay
Returns
Promise<readonly RTCIceServer[]>
join()
join(room, auth?): NetworkManager;Defined in: packages/core/src/network/mesh.ts:77
A space's share of the mesh: the peers that proved themselves in its room.
connect() enters the room and disconnect() leaves it.
Parameters
| Parameter | Type | Description |
|---|---|---|
room | string | The space's room — a hash of its id |
auth? | MeshAuth | null | What peers must prove here; null lets anyone in the room in |
Returns
reconnect()
reconnect(): void;Defined in: packages/core/src/network/mesh.ts:87
Tries every relay that is waiting to reconnect, now
Returns
void
status()
status(): MeshStatus;Defined in: packages/core/src/network/mesh.ts:83
The relays, the connections open and the ones being made, as they are now
Returns
subscribe()
subscribe(listener): () => void;Defined in: packages/core/src/network/mesh.ts:85
Hears every change to status(); returns a function that stops it
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
useRelays()
useRelays(room, relays): void;Defined in: packages/core/src/network/mesh.ts:79
The relays a room's space names as its own (sys.relays), joined for that room on top of the mesh's
Parameters
| Parameter | Type |
|---|---|
room | string |
relays | readonly string[] |
Returns
void