NetUtils
Static Method Summary
Static Public Methods | ||
public static |
bytesToIp(ip: Uint8Array): string |
|
public static |
hostGloballyReachable(host: string): boolean |
|
public static |
ipToBytes(ip: string): Uint8Array |
|
public static |
ipToSubnet(ip: string | Uint8Array, bitCount: number): string | Uint8Array |
|
public static |
isIPv4Address(ip: string | Uint8Array): boolean |
|
public static |
isIPv4inSubnet(ip: string | Uint8Array, subnet: string): boolean |
|
public static |
isIPv6Address(ip: string | Uint8Array): boolean |
|
public static |
isLocalIP(ip: string | Uint8Array): boolean |
|
public static |
isPrivateIP(ip: string | Uint8Array): boolean |
Static Public Methods
public static bytesToIp(ip: Uint8Array): string source
Params:
Name | Type | Attribute | Description |
ip | Uint8Array |
Return:
string |
public static hostGloballyReachable(host: string): boolean source
Params:
Name | Type | Attribute | Description |
host | string |
Return:
boolean |
public static ipToBytes(ip: string): Uint8Array source
Params:
Name | Type | Attribute | Description |
ip | string |
Return:
Uint8Array |
public static ipToSubnet(ip: string | Uint8Array, bitCount: number): string | Uint8Array source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array | ||
bitCount | number |
Return:
string | Uint8Array |
public static isIPv4Address(ip: string | Uint8Array): boolean source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array |
Return:
boolean |
public static isIPv4inSubnet(ip: string | Uint8Array, subnet: string): boolean source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array | ||
subnet | string |
Return:
boolean |
public static isIPv6Address(ip: string | Uint8Array): boolean source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array |
Return:
boolean |
public static isLocalIP(ip: string | Uint8Array): boolean source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array |
Return:
boolean |
public static isPrivateIP(ip: string | Uint8Array): boolean source
Params:
Name | Type | Attribute | Description |
ip | string | Uint8Array |
Return:
boolean |