mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added a new connectivity reader to the Network module. It sends a low-level (ICMP) ping message to 1.1.1.1. (#1082)
This commit is contained in:
@@ -549,3 +549,12 @@ extension NSTextView {
|
||||
return super.performKeyEquivalent(with: event)
|
||||
}
|
||||
}
|
||||
|
||||
public extension Data {
|
||||
var socketAddress: sockaddr {
|
||||
return withUnsafeBytes { $0.load(as: sockaddr.self) }
|
||||
}
|
||||
var socketAddressInternet: sockaddr_in {
|
||||
return withUnsafeBytes { $0.load(as: sockaddr_in.self) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user