1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! RTMP simple handshake (C0/C1/C2 <-> S0/S1/S2).
//!
//! We use the plain (non-crypto-digest) handshake: it interoperates with
//! mediamtx, nginx-rtmp, and the major ingest servers for publishing. C1/C2 are
//! 1536 bytes: 4-byte time, 4-byte zero, 1528 random bytes. We echo S1 as C2.
use ;
use TcpStream;
use crateResult;
const RTMP_VERSION: u8 = 3;
const HANDSHAKE_SIZE: usize = 1536;
pub async
/// Tiny xorshift RNG — the handshake random bytes don't need crypto quality.
;