A Matrix-spec compliant server name.

It consists of a host and an optional port (separated by a colon if present).

Constructors

Properties

Methods

Constructors

  • Parse/validate and create a new ServerName.

    Parameters

    • name: string

    Returns ServerName

Properties

host: string

Returns the host of the server name.

That is: Return the part of the server before :<port> or the full server name if there is no port.

port: undefined | number

Returns the port of the server name if any.

Methods

  • Returns void

  • Returns true if and only if the server name is an IPv4 or IPv6 address.

    Returns boolean