Sign in

    moonbit-community/rtc/datachannel does not have a README file

    DataChannelError

    pub(all) suberror DataChannelError {
    InvalidConfiguration(String)
    ProtocolViolation(String)
    BufferFull
    Sctp(
    SctpError
    )
    Closed
    } derive(Eq,
    Debug
    )

    ChannelType

    pub(all) enum ChannelType {
    ReliableChannel
    ReliableUnorderedChannel
    PartialReliableRetransmitChannel
    PartialReliableRetransmitUnorderedChannel
    PartialReliableTimedChannel
    PartialReliableTimedUnorderedChannel
    } derive(Eq,
    Debug
    )

    DataChannel

    pub struct DataChannel {
    id :
    StreamId

    label : String
    protocol : String
    ordering :
    Ordering

    reliability :
    Reliability

    negotiated : Bool
    priority : UInt16
    state : DataChannelState
    } derive(Eq,
    Debug
    )

    DataChannel::is_negotiated

    fn DataChannel::is_negotiated(self : DataChannel) -> Bool

    DataChannel::label

    fn DataChannel::label(self : DataChannel) -> String

    DataChannel::new

    fn DataChannel::new(id~ :
    StreamId
    , label~ : String, protocol? : String, ordering? :
    Ordering
    , reliability? :
    Reliability
    , negotiated? : Bool, priority? : UInt16) -> DataChannel

    DataChannel::ordering

    DataChannel::priority

    fn DataChannel::priority(self : DataChannel) -> UInt16

    DataChannel::protocol

    fn DataChannel::protocol(self : DataChannel) -> String

    DataChannel::reliability

    DataChannel::state

    DataChannelConfig

    pub struct DataChannelConfig {
    label : String
    protocol : String
    ordering :
    Ordering

    reliability :
    Reliability

    negotiated : Bool
    id :
    StreamId
    ?
    priority : UInt16
    } derive(Eq,
    Debug
    )

    DataChannelConfig::is_negotiated

    fn DataChannelConfig::is_negotiated(self : DataChannelConfig) -> Bool

    DataChannelConfig::label

    fn DataChannelConfig::label(self : DataChannelConfig) -> String

    DataChannelConfig::new

    fn DataChannelConfig::new(label~ : String, protocol? : String, ordering? :
    Ordering
    , reliability? :
    Reliability
    , negotiated? : Bool, id? :
    StreamId
    , priority? : UInt16) -> DataChannelConfig raise DataChannelError

    DataChannelConfig::priority

    fn DataChannelConfig::priority(self : DataChannelConfig) -> UInt16

    DataChannelConfig::protocol

    fn DataChannelConfig::protocol(self : DataChannelConfig) -> String

    DataChannelConfig::reliability

    DataChannelMessage

    pub(all) enum DataChannelMessage {
    Text(String)
    Binary(Bytes)
    } derive(Eq,
    Debug
    )

    DataChannelState

    pub(all) enum DataChannelState {
    Connecting
    Open
    Closing
    Closed
    } derive(Eq,
    Debug
    )

    DcepMessage

    pub(all) enum DcepMessage {
    Open(DcepOpen)
    Acknowledgement
    } derive(Eq,
    Debug
    )

    DcepMessage::decode

    fn DcepMessage::decode(data : Bytes) -> DcepMessage raise DataChannelError

    DcepMessage::encode

    fn DcepMessage::encode(self : DcepMessage) -> Bytes raise DataChannelError

    DcepOpen

    pub struct DcepOpen {
    channel_type : ChannelType
    priority : UInt16
    reliability_parameter : UInt
    label : String
    protocol : String
    } derive(Eq,
    Debug
    )

    DcepOpen::channel_type

    fn DcepOpen::channel_type(self : DcepOpen) -> ChannelType

    DcepOpen::label

    fn DcepOpen::label(self : DcepOpen) -> String

    DcepOpen::new

    fn DcepOpen::new(channel_type~ : ChannelType, priority? : UInt16, reliability_parameter? : UInt, label~ : String, protocol? : String) -> DcepOpen raise DataChannelError

    DcepOpen::priority

    fn DcepOpen::priority(self : DcepOpen) -> UInt16

    DcepOpen::protocol

    fn DcepOpen::protocol(self : DcepOpen) -> String

    DcepOpen::reliability_parameter

    fn DcepOpen::reliability_parameter(self : DcepOpen) -> UInt

    Manager

    Manager::all_channels

    fn Manager::all_channels(self : Manager) -> Array[DataChannel]

    Manager::channel

    Manager::close_channel

    fn Manager::close_channel(self : Manager, stream :
    StreamId
    ) -> Unit raise DataChannelError

    Manager::create_channel

    fn Manager::create_channel(self : Manager, config : DataChannelConfig) -> DataChannel raise DataChannelError

    Manager::handle_sctp_event

    Manager::new

    fn Manager::new(role~ : StreamRole) -> Manager

    Manager::poll_command

    fn Manager::poll_command(self : Manager) -> DataChannelCommand?

    Manager::poll_event

    fn Manager::poll_event(self : Manager) -> DataChannelEvent?

    Manager::role

    fn Manager::role(self : Manager) -> StreamRole

    Manager::send

    PayloadProtocolIdentifier

    pub(all) enum PayloadProtocolIdentifier {
    Dcep
    StringPayload
    BinaryPayload
    StringEmptyPayload
    BinaryEmptyPayload
    } derive(Eq,
    Debug
    )

    PayloadProtocolIdentifier::code

    PayloadProtocolIdentifier::from_code

    StreamRole

    pub(all) enum StreamRole {
    DtlsClient
    DtlsServer
    } derive(Eq,
    Debug
    )

    Transport

    pub struct Transport {
    association :
    Association

    manager : Manager
    }

    Transport::association_state

    Transport::buffered_amount

    fn Transport::buffered_amount(self : Transport, stream :
    StreamId
    ) -> UInt64

    Transport::channel

    Transport::close

    Transport::create_channel

    Transport::handle_datagram

    fn Transport::handle_datagram(self : Transport, now :
    Instant
    , datagram : Bytes) -> Unit raise DataChannelError

    Transport::handle_timeout

    Transport::poll_datagram

    fn Transport::poll_datagram(self : Transport) -> Bytes?

    Transport::poll_event

    fn Transport::poll_event(self : Transport) -> DataChannelEvent?

    Transport::poll_timeout

    Transport::set_buffered_amount_low_threshold

    fn Transport::set_buffered_amount_low_threshold(self : Transport, stream :
    StreamId
    , threshold : UInt64) -> Unit

    Transport::start

    Transport::with_manager