moonbitstack/moonrtc/dc does not have a README file

    ChannelEvent

    pub(all) struct ChannelEvent {
    channel_id : Int
    text : String?
    binary : Bytes?
    } derive(Eq,
    Debug
    )

    ChannelType

    pub(all) enum ChannelType {
    Reliable
    ReliableUnordered
    PartialReliableRexmit
    PartialReliableRexmitUnordered
    PartialReliableTimed
    PartialReliableTimedUnordered
    } derive(Eq,
    Debug
    )

    DataChannel

    pub(all) struct DataChannel {
    id : Int
    label : String
    protocol : String
    channel_type : ChannelType
    open : Bool
    } derive(Eq,
    Debug
    )

    Manager

    pub struct Manager {
    assoc :
    Association

    channels : Map[Int, DataChannel]
    next_stream_id : Int
    }

    Manager::new

    fn Manager::new(assoc :
    Association
    , is_dtls_client : Bool) -> Manager

    Manager::open_channel

    fn Manager::open_channel(self : Manager, label : String, protocol? : String, channel_type? : ChannelType) -> (DataChannel, Bytes)

    Open a new DataChannel and return (channel, sctp_packet).

    Manager::poll_events

    fn Manager::poll_events(self : Manager) -> (Array[Bytes], Array[ChannelEvent])

    Process incoming SCTP data frames drained from assoc, returning (outbound_sctp_packets, received_channel_events).

    Manager::send_binary

    fn Manager::send_binary(self : Manager, channel_id : Int, data : Bytes) -> Bytes

    Manager::send_text

    fn Manager::send_text(self : Manager, channel_id : Int, text : String) -> Bytes

    OpenMessage

    pub(all) struct OpenMessage {
    channel_type : ChannelType
    priority : Int
    reliability_param : UInt
    label : String
    protocol : String
    } derive(Eq,
    Debug
    )

    OpenMessage::decode

    fn OpenMessage::decode(raw : BytesView) -> OpenMessage?

    OpenMessage::encode

    fn OpenMessage::encode(self : OpenMessage) -> Bytes

    encode_ack

    fn encode_ack() -> Bytes

    is_ack

    fn is_ack(raw : BytesView) -> Bool

    ppid_binary

    let ppid_binary : UInt

    ppid_dcep

    let ppid_dcep : UInt

    ppid_string

    let ppid_string : UInt

    Source Files