@@ -22,10 +22,8 @@ The rate you wish to send data might be much higher than the rate the data chann
22
22
actually send to the peer over the Internet. The above properties/methods help your
23
23
application to pace the amount of data to be pushed into the data channel.
24
24
25
-
26
25
## How to run the example code
27
-
28
- The demo code implements two endpoints (offer_pc and answer_pc) in it.
26
+ The demo code implements two endpoints (requester and responder) in it.
29
27
30
28
```
31
29
signaling messages
@@ -34,31 +32,31 @@ The demo code implements two endpoints (offer_pc and answer_pc) in it.
34
32
v v
35
33
+---------------+ +---------------+
36
34
| | data | |
37
- | offer_pc |----------------------->| answer_pc |
35
+ | requester |----------------------->| responder |
38
36
|:PeerConnection| |:PeerConnection|
39
37
+---------------+ +---------------+
40
38
```
41
39
42
- First offer_pc and answer_pc will exchange signaling message to establish a peer-to-peer
40
+ First requester and responder will exchange signaling message to establish a peer-to-peer
43
41
connection, and data channel (label: "data").
44
42
45
- Once the data channel is successfully opened, offer_pc will start sending a series of
46
- 1024-byte packets to answer_pc as fast as it can , until you kill the process by Ctrl-c .
43
+ Once the data channel is successfully opened, requester will start sending a series of
44
+ 1024-byte packets to responder , until you kill the process by Ctrl+С .
47
45
46
+ Here's how to run the code:
48
47
49
- Here's how to run the code.
50
-
51
- At the root of the example:
52
48
```
53
- $ cargo run
54
- Peer Connection State has changed: connected (offerer)
55
- Peer Connection State has changed: connected (answerer)
56
- OnOpen: data-1. Start sending a series of 1024-byte packets as fast as it can
57
- OnOpen: data-1. Start receiving data
58
- Throughput: 12.990 Mbps
59
- Throughput: 13.698 Mbps
60
- Throughput: 13.559 Mbps
61
- Throughput: 13.345 Mbps
62
- Throughput: 13.565 Mbps
63
- :
49
+ $ cargo run --release --example data-channels-flow-control
50
+ Finished release [optimized] target(s) in 0.36s
51
+ Running `target\release\examples\data-channels-flow-control.exe`
52
+
53
+ Throughput is about 127.060 Mbps
54
+ Throughput is about 122.091 Mbps
55
+ Throughput is about 120.630 Mbps
56
+ Throughput is about 120.105 Mbps
57
+ Throughput is about 119.873 Mbps
58
+ Throughput is about 118.890 Mbps
59
+ Throughput is about 118.525 Mbps
60
+ Throughput is about 118.614 Mbps
61
+
64
62
```
0 commit comments