(host?: string)
| 9 | |
| 10 | // Get Connection Type |
| 11 | function _createReachability(host?: string): any { |
| 12 | if (host) { |
| 13 | return SCNetworkReachabilityCreateWithName(null, host); |
| 14 | } else { |
| 15 | const zeroAddress = new interop.Reference<sockaddr>(sockaddr, { |
| 16 | sa_len: 16, |
| 17 | sa_family: 2, |
| 18 | }); |
| 19 | |
| 20 | return SCNetworkReachabilityCreateWithAddress(null, zeroAddress); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | function _getReachabilityFlags(host?: string): number { |
| 25 | const reachability = _createReachability(host); |
no outgoing calls
no test coverage detected