moonbit-community/rtc/datachannel does not have a README file
pub struct DataChannel {
id : StreamId
label : String
protocol : String
ordering : Ordering
reliability : Reliability
negotiated : Bool
priority : UInt16
state : DataChannelState
} derive(Eq, Debug)fn DataChannel::new(id~ : StreamId, label~ : String, protocol? : String, ordering? : Ordering, reliability? : Reliability, negotiated? : Bool, priority? : UInt16) -> DataChannelpub(all) enum DataChannelCommand {
SendSctp(Message, Reliability)
ResetSctpStream(StreamId)
} derive(Eq, Debug)pub struct DataChannelConfig {
label : String
protocol : String
ordering : Ordering
reliability : Reliability
negotiated : Bool
id : StreamId?
priority : UInt16
} derive(Eq, Debug)fn DataChannelConfig::new(label~ : String, protocol? : String, ordering? : Ordering, reliability? : Reliability, negotiated? : Bool, id? : StreamId, priority? : UInt16) -> DataChannelConfig raise DataChannelErrorpub(all) enum DataChannelEvent {
Opened(DataChannel)
MessageReceived(StreamId, DataChannelMessage)
ClosedEvent(StreamId)
BufferedAmountLowEvent(StreamId)
} derive(Eq, Debug)pub struct DcepOpen {
channel_type : ChannelType
priority : UInt16
reliability_parameter : UInt
label : String
protocol : String
} derive(Eq, Debug)fn DcepOpen::new(channel_type~ : ChannelType, priority? : UInt16, reliability_parameter? : UInt, label~ : String, protocol? : String) -> DcepOpen raise DataChannelErrorpub struct Manager {
role : StreamRole
channels : Map[StreamId, DataChannel]
local_channels : Map[StreamId, Bool]
incoming_resets : Map[StreamId, Bool]
outgoing_resets : Map[StreamId, Bool]
acknowledged_resets : Map[StreamId, Bool]
commands : Queue[DataChannelCommand]
events : Queue[DataChannelEvent]
transport_ready : Bool
next_stream : UInt
}fn Manager::create_channel(self : Manager, config : DataChannelConfig) -> DataChannel raise DataChannelErrorfn Manager::handle_sctp_event(self : Manager, event : AssociationEvent) -> Unit raise DataChannelErrorfn Manager::send(self : Manager, stream : StreamId, message : DataChannelMessage) -> Unit raise DataChannelErrorfn Manager::set_role(self : Manager, role : StreamRole) -> Array[(StreamId, StreamId)] raise DataChannelErrorfn PayloadProtocolIdentifier::from_code(code : UInt) -> PayloadProtocolIdentifier raise DataChannelErrorfn Transport::close_channel(self : Transport, stream : StreamId, now : Instant) -> Unit raise DataChannelErrorfn Transport::create_channel(self : Transport, config : DataChannelConfig, now : Instant) -> DataChannel raise DataChannelErrorfn Transport::handle_datagram(self : Transport, now : Instant, datagram : Bytes) -> Unit raise DataChannelErrorfn Transport::new(role~ : StreamRole, association_config~ : AssociationConfig) -> Transport raise DataChannelErrorfn Transport::send(self : Transport, stream : StreamId, message : DataChannelMessage, now : Instant) -> Unit raise DataChannelErrorfn Transport::with_manager(manager~ : Manager, association_config~ : AssociationConfig) -> Transport raise DataChannelErrorInstall
Download zipExperimental Sans-I/O WebRTC stack for MoonBit
Dependencies