moonbit-community/rtc/stun does not have a README file
pub struct Attribute {
attribute_type : AttributeType
value : Bytes
padding : Bytes
} derive(Eq, Debug)fn Attribute::from_address(address : SocketAddress, attribute_type? : AttributeType) -> Attribute raise StunErrorfn Attribute::from_xor_address(address : SocketAddress, transaction_id : TransactionId, attribute_type? : AttributeType) -> Attribute raise StunErrorfn Attribute::to_xor_address(self : Attribute, transaction_id : TransactionId) -> SocketAddress raise StunErrorpub(all) enum AttributeType {
MappedAddress
ChangeRequest
SourceAddress
ChangedAddress
Username
MessageIntegrity
ErrorCode
UnknownAttributes
ChannelNumber
Lifetime
XorPeerAddress
DataAttribute
Realm
Nonce
XorRelayedAddress
RequestedAddressFamily
EvenPort
RequestedTransport
DontFragment
MessageIntegritySha256
PasswordAlgorithm
Userhash
XorMappedAddress
ReservationToken
Priority
UseCandidate
PaddingAttribute
ResponsePort
ConnectionId
PasswordAlgorithms
AlternateDomain
Software
AlternateServer
CacheTimeout
Fingerprint
IceControlled
IceControlling
ResponseOrigin
OtherAddress
Origin
NetworkCost
UnknownAttribute(UInt16)
} derive(Eq, Debug)pub struct Message {
class : MessageClass
stun_method : Method
transaction_id : TransactionId
attributes : Array[Attribute]
} derive(Eq, Debug)fn Message::new(class~ : MessageClass, stun_method~ : Method, transaction_id~ : TransactionId, attributes? : Array[Attribute]) -> Messagepub struct TransactionAgent {
transactions : Map[TransactionId, Instant]
events : Queue[TransactionEvent]
closed : Bool
}fn TransactionAgent::start(self : TransactionAgent, transaction_id : TransactionId, deadline : Instant) -> Unit raise StunErrorfn TransactionAgent::stop(self : TransactionAgent, transaction_id : TransactionId) -> Unit raise StunErrorpub struct TransactionEvent {
transaction_id : TransactionId
event : TransactionEventKind
} derive(Eq, Debug)Install
Download zipExperimental Sans-I/O WebRTC stack for MoonBit
Dependencies