Skip to content

Commit 7240230

Browse files
committed
fixed linting, more transport info in readme
1 parent 7232ab6 commit 7240230

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

packages/kalm/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@ To see working implementations, check out our [examples](https://github.com/kalm
8181
[[Read more]](https://github.com/kalm/kalm.js/wiki/How-it-works)
8282

8383
- Transports [[wiki]](https://github.com/kalm/kalm.js/wiki/Transports)
84+
- [@kalm/ipc](https://www.npmjs.com/package/@kalm/ipc)
85+
- [@kalm/tcp](https://www.npmjs.com/package/@kalm/tcp)
86+
- [@kalm/udp](https://www.npmjs.com/package/@kalm/udp)
87+
- [@kalm/webrtc](https://www.npmjs.com/package/@kalm/webrtc)
88+
- [@kalm/ws](https://www.npmjs.com/package/@kalm/ws)
8489
- Routines [[wiki]](https://github.com/kalm/kalm.js/wiki/Routines)
90+
- realtime
91+
- dynamic
92+
- tick
8593

8694
## Logging
8795

packages/webrtc/src/webrtc.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ function webrtc(config: WebRTCConfig = {}): KalmTransport {
1818
return node;
1919
}
2020

21-
function bind(): void {
22-
activeNode = createNode(true);
23-
passiveNode = createNode(false);
24-
activeNode.on('signal', signal => {
25-
if (signal.type === 'offer') emitter.emit('ready', signal);
26-
});
27-
28-
if (config.peers) config.peers.forEach(peer => negociate({ peer }));
29-
}
30-
3121
function negociate(event: any) {
3222
return new Promise(resolve => {
3323
if (!event.peer) throw new Error('No peer configuration provided in `connect`.');
@@ -43,6 +33,16 @@ function webrtc(config: WebRTCConfig = {}): KalmTransport {
4333
});
4434
}
4535

36+
function bind(): void {
37+
activeNode = createNode(true);
38+
passiveNode = createNode(false);
39+
activeNode.on('signal', signal => {
40+
if (signal.type === 'offer') emitter.emit('ready', signal);
41+
});
42+
43+
if (config.peers) config.peers.forEach(peer => negociate({ peer }));
44+
}
45+
4646
function send(handle: any, payload: number[]): void {
4747
handle.send(Buffer.from(payload));
4848
}

0 commit comments

Comments
 (0)