@agentdance/node-webrtc-sctp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @agentdance/node-webrtc-sctp
|
|
2
|
+
|
|
3
|
+
RFC 4960 / RFC 8832 SCTP + DCEP for Node.js — part of the [`@agentdance/node-webrtc`](https://github.com/agent-dance/node-webrtc) pure-TypeScript WebRTC stack.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Fragmentation & reassembly; SSN ordering
|
|
8
|
+
- Congestion control: cwnd / ssthresh / slow-start / congestion avoidance
|
|
9
|
+
- Fast retransmit on 3 duplicate SACKs; SACK gap blocks; FORWARD-TSN
|
|
10
|
+
- DCEP (RFC 8832): ordered, unordered, partial-reliability, pre-negotiated channels
|
|
11
|
+
- TSN wrap-around; clean SHUTDOWN sequence
|
|
12
|
+
- Zero native dependencies
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @agentdance/node-webrtc-sctp
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { SctpAssociation } from '@agentdance/node-webrtc-sctp';
|
|
24
|
+
|
|
25
|
+
const sctp = new SctpAssociation(dtlsTransport, { role: 'client', port: 5000 });
|
|
26
|
+
await sctp.connect();
|
|
27
|
+
const channel = await sctp.createDataChannel('chat');
|
|
28
|
+
channel.send('hello');
|
|
29
|
+
sctp.on('datachannel', (ch) => ch.on('message', console.log));
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Full Documentation
|
|
33
|
+
|
|
34
|
+
See the [main package README](https://github.com/agent-dance/node-webrtc#readme) for the complete API reference, usage examples, and architecture overview.
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdance/node-webrtc-sctp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "RFC 4960/8832 SCTP + DCEP — fragmentation, congestion control, fast retransmit, ordered/unordered delivery, pre-negotiated channels. Part of the @agentdance/node-webrtc stack.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webrtc",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
|
+
"README.md",
|
|
37
38
|
"dist",
|
|
38
39
|
"src"
|
|
39
40
|
],
|