moonbitstack/moonrtc/sdp does not have a README file

    SdpError

    pub(all) suberror SdpError {
    MalformedLine(String)
    InvalidValue(String)
    } derive(Eq,
    Debug
    )

    impl Show for SdpError

    CandidateLine

    pub(all) struct CandidateLine {
    foundation : String
    component : Int
    transport : String
    priority : UInt
    address : String
    port : Int
    typ : String
    } derive(Eq,
    Debug
    )

    Fingerprint

    pub(all) struct Fingerprint {
    alg : String
    hash : String
    } derive(Eq,
    Debug
    )

    IceCreds

    pub(all) struct IceCreds {
    ufrag : String
    pwd : String
    } derive(Eq,
    Debug
    )

    MediaDesc

    pub(all) struct MediaDesc {
    kind : String
    port : Int
    proto : String
    formats : Array[String]
    mid : String?
    setup : SetupRole?
    ice : IceCreds?
    fingerprint : Fingerprint?
    candidates : Array[CandidateLine]
    rtpmaps : Array[(Int, String)]
    fmtps : Array[(Int, String)]
    attrs : Array[(String, String)]
    } derive(Eq,
    Debug
    )

    SessionDesc

    pub(all) struct SessionDesc {
    version : Int
    origin : String
    session_name : String
    ice : IceCreds?
    fingerprint : Fingerprint?
    group_bundle : Array[String]
    media : Array[MediaDesc]
    attrs : Array[(String, String)]
    } derive(Eq,
    Debug
    )

    SetupRole

    pub(all) enum SetupRole {
    Actpass
    Active
    Passive
    } derive(Eq,
    Debug
    )

    DTLS setup role (a=setup:..., RFC 4145 / RFC 8842).
    impl Show for SetupRole

    data_channel_sdp

    fn data_channel_sdp(ice : IceCreds, fingerprint : Fingerprint, setup : SetupRole, candidates? : Array[CandidateLine], mid? : String) -> SessionDesc

    Build a minimal WebRTC DataChannel SDP offer or answer.

    encode

    fn encode(desc : SessionDesc) -> String

    Serialize a SessionDesc to canonical CRLF-delimited SDP text.

    parse

    fn parse(input : StringView) -> SessionDesc raise SdpError

    Parse an SDP string (CRLF or LF line endings).

    Source Files