isDtlsPacket
fn
bool isDtlsPacket(ubyte firstByte) @safe pure nothrow @nogcDemultiplexes DTLS and RTP/RTCP packets (RFC 5764 §5.1.2).
Examines the first byte to determine if a received packet is a DTLS record or an RTP/RTCP packet. Per RFC 5764 §5.1.2 the ranges are disjoint:
- 20-63: DTLS (valid ContentType values)
- 128-191: RTP/RTCP (version 2 with the padding bit clear/set)
Parameters
firstByteThe first byte of the received packet. Returns
true if the packet is DTLS, false if it is RTP/RTCP.