srt-runtime 0.9.0

SRT (Secure Reliable Transport, draft-sharabayko-srt-01) packet codecs + sans-IO HSv5 Caller-Listener and Rendezvous handshake state machines, an ARQ reliability engine, a TSBPD delivery scheduler, LiveCC packet pacing, FileCC window-based congestion control, optional (crypto feature) payload encryption, and an optional (tokio feature) async UDP socket adapter; no_std core.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use srt_runtime::Error;
use srt_runtime::packet::handshake::{ExtensionType, HandshakeExtensionBlock};

#[test]
fn a_stream_id_that_is_not_utf8_is_invalid_stream_id_utf8() {
    let block = HandshakeExtensionBlock {
        ext_type: ExtensionType::Sid,
        contents: &[0xFF; 4],
    };
    assert_eq!(
        block.as_stream_id().unwrap_err(),
        Error::InvalidStreamIdUtf8
    );
}