(host: string, port: number)
| 947 | } |
| 948 | |
| 949 | static fromHostPort(host: string, port: number): HostAddress { |
| 950 | if (host.includes(':')) { |
| 951 | host = `[${host}]`; // IPv6 address |
| 952 | } |
| 953 | return HostAddress.fromString(`${host}:${port}`); |
| 954 | } |
| 955 | |
| 956 | static fromSrvRecord({ name, port }: SrvRecord): HostAddress { |
| 957 | return HostAddress.fromHostPort(name, port); |
no test coverage detected