Module handshake

Source
Expand description

RTMP handshake logic.

Order of messages:

Client -> C0 -> Server
Client -> C1 -> Server
Client <- S0 <- Server
Client <- S1 <- Server
Client <- S2 <- Server
Client -> C2 -> Server

Modules§

complex
This module contains the complex handshake for the RTMP protocol.
simple
Simple Handshake Server

Constants§

RTMP_HANDSHAKE_SIZE
This is the total size of the C1/S1 C2/S2 packets.
TIME_VERSION_LENGTH
This is the length of the time and version. The time is 4 bytes and the version is 4 bytes.
CHUNK_LENGTH
This is the length of the chunk. The chunk is 764 bytes. or (1536 - 8) / 2 = 764

Structs§

RtmpVersion
The RTMP version.

Enums§

ServerHandshakeState
The state of the handshake.
HandshakeServer
The server side of the handshake.

Functions§

current_time
Returns the current unix epoch time in nanoseconds.