A Network interface enhances a TransportInterface with the ability to open a channel to a remote server.

Implements

Constructors

Accessors

Methods

Constructors

Accessors

  • get port(): number
  • Returns number

Methods

  • Returns Promise<void>

  • Parameters

    • listener: ((channel: Channel<Uint8Array>, messageBytes: Uint8Array) => void)
        • (channel, messageBytes): void
        • Parameters

          • channel: Channel<Uint8Array>
          • messageBytes: Uint8Array

          Returns void

    Returns Listener

  • Parameters

    Returns Promise<UdpConnection>

  • Parameters

    Returns boolean

  • Parameters

    • network: Network
    • type: "udp4" | "udp6"
    • Optionalport: number
    • Optionalhost: string
    • OptionalnetInterface: string

    Returns Promise<UdpInterface>