• Johan Sternerup's avatar
    webrtcbin: Support closing of data channels · 8dbdfad9
    Johan Sternerup authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
    Support for closing WebRTC data channels as described in RFC
    8831 (section 6.7) now fully supported. This means that we can now
    reuse data channels that have been closed properly. Previously, an
    application that created a lot of short-lived on-demand data channels
    would quickly exhaust resources held by lingering non-closed data
    We now use a one-to-one style socket interface to SCTP just like the
    Google implementation (i.e. SOCK_STREAM instead of SOCK_SEQPACKET, see
    RFC 6458). For some reason the socket interface to use was made
    optional through a property "use-sock-stream" even though code wasn't
    written to handle the SOCK_SEQPACKET style. Specifically the
    SCTP_RESET_STREAMS command wouldn't work without passing the correct
    assocation id. Changing the default interface to use from
    SOCK_SEQPACKET to SOCK_STREAM now means we don't have to bother about
    the association id as there is only one association per socket. For
    the SCTP_RESET_STREAMS command we set it to SCTP_ALL_ASSOC just to
    match the Google implementation.
    Part-of: <!2186>