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

Structs§

RtmpVersion
The RTMP version.

Enums§

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

Constants§

CHUNK_LENGTH
This is the length of the chunk. The chunk is 764 bytes. or (1536 - 8) / 2 = 764
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.

Functions§

current_time
Returns the current unix epoch time in nanoseconds.