MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _createReachability

Function _createReachability

packages/core/connectivity/index.ios.ts:11–22  ·  view source on GitHub ↗
(host?: string)

Source from the content-addressed store, hash-verified

9
10// Get Connection Type
11function _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
24function _getReachabilityFlags(host?: string): number {
25 const reachability = _createReachability(host);

Callers 2

_getReachabilityFlagsFunction · 0.85
startMonitoringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected