Gjsify LogoGjsify Logo

The #NiceAddress structure that represents an IPv4 or IPv6 address.

record

Hierarchy

  • Address

Index

Constructors

Properties

name: string

Methods

  • copyToSockaddr(sin: object): void
  • Fills the sockaddr structure sin with the address contained in addr

    Parameters

    • sin: object

      The sockaddr to fill

    Returns void

  • Compares two #NiceAddress structures to see if they contain the same address and the same port.

    Parameters

    Returns boolean

  • Compares two #NiceAddress structures to see if they contain the same address, ignoring the port.

    Parameters

    Returns boolean

  • free(): void
  • Frees a #NiceAddress created with nice_address_new() or nice_address_dup()

    Returns void

  • getPort(): number
  • init(): void
  • Initialize a #NiceAddress into an undefined address

    Returns void

  • ipVersion(): number
  • isPrivate(): boolean
  • Verifies if the address in addr is a private address or not

    Returns boolean

  • isValid(): boolean
  • Validate whether the #NiceAddress addr is a valid IPv4 or IPv6 address

    Returns boolean

  • setFromSockaddr(sin: object): void
  • Sets an IPv4 or IPv6 address from the sockaddr structure sin

    Parameters

    • sin: object

      The sockaddr to set

    Returns void

  • setFromString(str: string): boolean
  • Sets an IPv4 or IPv6 address from the string str

    Parameters

    • str: string

      The string to set

    Returns boolean

  • setIpv4(addrIpv4: number): void
  • Set addr to an IPv4 address using the data from addr_ipv4

    This function will reset the port to 0, so make sure you call it before nice_address_set_port()

    Parameters

    • addrIpv4: number

      The IPv4 address

    Returns void

  • setIpv6(addrIpv6: number): void
  • Set addr to an IPv6 address using the data from addr_ipv6

    This function will reset the port to 0, so make sure you call it before nice_address_set_port()

    Parameters

    • addrIpv6: number

      The IPv6 address

    Returns void

  • setPort(port: number): void
  • Set the port of addr to port

    Parameters

    • port: number

      The port to set

    Returns void

  • toString(dst: string): void
  • Transforms the address addr into a human readable string

    Parameters

    • dst: string

      The string to fill

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method