Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SocketAddress

The address of a socket, an inet socket address or a domain socket address.

Use {@link SocketAddress#inetSocketAddress} to create an inet socket address and {@link SocketAddress#domainSocketAddress} to create a domain socket address

Hierarchy

  • SocketAddress

Index

Methods

host

  • host(): string
  • Returns the host name when available or the IP address in string representation.
    Domain socket address returns null.

    Returns string

hostAddress

  • hostAddress(): string
  • Returns the host IP address when available or null as a String.
    Domain socket address returns null.

    Returns string

hostName

  • hostName(): string
  • Returns the host name when available or null
    Domain socket address returns null.

    Returns string

isDomainSocket

  • isDomainSocket(): boolean
  • Returns boolean

isInetSocket

  • isInetSocket(): boolean
  • Returns boolean

path

  • path(): string
  • Returns string

port

  • port(): number
  • Returns number

Static domainSocketAddress

  • Create a domain socket address from a path.

    Parameters

    • path: string

    Returns SocketAddress

Static inetSocketAddress

  • Create an inet socket address, host must be non null and port must be between 0 and 65536.
    The host string can be a host name or a host address.
    No name resolution will be attempted.

    Parameters

    • port: number
    • host: string

    Returns SocketAddress

  • Create a inet socket address from a Java .
    No name resolution will be attempted.

    Parameters

    • address: any

    Returns SocketAddress

Static sharedRandomPort

  • Create an inet socket address that binds to a shared random port identified by id.
    The host string can be a host name or a host address.
    No name resolution will be attempted.

    Parameters

    • id: number
    • host: string

    Returns SocketAddress

Generated using TypeDoc