Sign in

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

    AddressError

    pub(all) suberror AddressError {
    InvalidIpv6Length(Int)
    InvalidAddress(String)
    } derive(Eq,
    Debug
    )

    TimeError

    pub(all) suberror TimeError {
    NegativeMonotonicTime(Int64)
    NegativeDuration(Int64)
    TimeOverflow
    } derive(Eq,
    Debug
    )

    ClockSample

    pub struct ClockSample {
    monotonic : Instant
    wall : WallTime
    } derive(Eq,
    Debug
    )

    ClockSample::monotonic

    fn ClockSample::monotonic(self : ClockSample) -> Instant

    ClockSample::new

    fn ClockSample::new(monotonic~ : Instant, wall~ : WallTime) -> ClockSample

    ClockSample::wall

    fn ClockSample::wall(self : ClockSample) -> WallTime

    ClockSample::wall_at

    fn ClockSample::wall_at(self : ClockSample, instant : Instant) -> WallTime raise TimeError

    ConnectionId

    pub(all) struct ConnectionId(UInt64) derive(Eq, Hash,
    Debug
    )

    Duration

    pub struct Duration(Int64) derive(Compare, Eq,
    Debug
    )

    Duration::as_milliseconds

    fn Duration::as_milliseconds(self : Duration) -> Int64

    Duration::milliseconds

    fn Duration::milliseconds(value : Int64) -> Duration raise TimeError

    Duration::zero

    fn Duration::zero() -> Duration

    EcnCodepoint

    pub(all) enum EcnCodepoint {
    Ect0
    Ect1
    CongestionExperienced
    } derive(Eq,
    Debug
    )

    InboundDatagram

    pub(all) struct InboundDatagram {
    now : Instant
    context : TransportContext
    payload : Bytes
    } derive(Eq,
    Debug
    )

    Instant

    pub struct Instant(Int64) derive(Compare, Eq,
    Debug
    )

    Instant::as_milliseconds

    fn Instant::as_milliseconds(self : Instant) -> Int64

    Instant::checked_add

    fn Instant::checked_add(self : Instant, duration : Duration) -> Instant raise TimeError

    Instant::from_milliseconds

    fn Instant::from_milliseconds(value : Int64) -> Instant raise TimeError

    Instant::saturating_duration_since

    fn Instant::saturating_duration_since(self : Instant, earlier : Instant) -> Duration

    IoAction

    pub(all) enum IoAction {
    SendDatagram(OutboundDatagram)
    ConnectTcp(connection~ : ConnectionId, local_address~ : SocketAddress?, peer~ : SocketAddress)
    ConnectTls(connection~ : ConnectionId, local_address~ : SocketAddress?, peer~ : SocketAddress, server_name~ : String?)
    ListenTcp(listener~ : ListenerId, local_address~ : SocketAddress)
    WriteStream(connection~ : ConnectionId, bytes~ : Bytes)
    CloseStream(ConnectionId)
    CloseListener(ListenerId)
    } derive(Eq,
    Debug
    )

    IoEvent

    pub(all) enum IoEvent {
    DatagramReceived(InboundDatagram)
    StreamConnected(now~ : Instant, connection~ : ConnectionId, context~ : TransportContext)
    StreamAccepted(now~ : Instant, listener~ : ListenerId, connection~ : ConnectionId, context~ : TransportContext)
    StreamBytes(now~ : Instant, connection~ : ConnectionId, bytes~ : Bytes)
    StreamWritable(now~ : Instant, connection~ : ConnectionId)
    StreamEof(now~ : Instant, connection~ : ConnectionId)
    StreamError(now~ : Instant, connection~ : ConnectionId, reason~ : String)
    StreamClosed(now~ : Instant, connection~ : ConnectionId)
    } derive(Eq,
    Debug
    )

    IpAddress

    pub enum IpAddress {
    V4(UInt)
    V6(Bytes)
    } derive(Eq,
    Debug
    )

    IpAddress::is_unspecified

    fn IpAddress::is_unspecified(self : IpAddress) -> Bool

    IpAddress::loopback_v4

    fn IpAddress::loopback_v4() -> IpAddress

    IpAddress::parse

    fn IpAddress::parse(value : String) -> IpAddress raise AddressError

    IpAddress::to_bytes

    fn IpAddress::to_bytes(self : IpAddress) -> Bytes

    IpAddress::to_string

    fn IpAddress::to_string(self : IpAddress) -> String

    IpAddress::v4

    fn IpAddress::v4(a : Byte, b : Byte, c : Byte, d : Byte) -> IpAddress

    IpAddress::v6

    fn IpAddress::v6(bytes : Bytes) -> IpAddress raise AddressError

    ListenerId

    pub(all) struct ListenerId(UInt64) derive(Eq, Hash,
    Debug
    )

    ManualClock

    pub struct ManualClock {
    monotonic : Instant
    wall : WallTime
    }

    ManualClock::advance

    fn ManualClock::advance(self : ManualClock, duration : Duration) -> Unit raise TimeError

    ManualClock::new

    fn ManualClock::new(sample : ClockSample) -> ManualClock

    ManualClock::sample

    fn ManualClock::sample(self : ManualClock) -> ClockSample

    OutboundDatagram

    pub(all) struct OutboundDatagram {
    context : TransportContext
    payload : Bytes
    } derive(Eq,
    Debug
    )

    SocketAddress

    pub struct SocketAddress {
    address : IpAddress
    port : UInt16
    } derive(Eq,
    Debug
    )

    SocketAddress::address

    fn SocketAddress::address(self : SocketAddress) -> IpAddress

    SocketAddress::new

    fn SocketAddress::new(address~ : IpAddress, port~ : UInt16) -> SocketAddress

    SocketAddress::port

    fn SocketAddress::port(self : SocketAddress) -> UInt16

    SocketAddress::to_string

    fn SocketAddress::to_string(self : SocketAddress) -> String

    TransportContext

    pub(all) struct TransportContext {
    local_address : SocketAddress
    peer : SocketAddress
    ecn : EcnCodepoint?
    protocol : TransportProtocol
    } derive(Eq,
    Debug
    )

    TransportProtocol

    pub(all) enum TransportProtocol {
    Udp
    Tcp
    } derive(Eq,
    Debug
    )

    WallTime

    pub struct WallTime(Int64) derive(Compare, Eq,
    Debug
    )

    WallTime::as_unix_nanoseconds

    fn WallTime::as_unix_nanoseconds(self : WallTime) -> Int64

    WallTime::from_unix_nanoseconds

    fn WallTime::from_unix_nanoseconds(value : Int64) -> WallTime

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io