-
A utility function that returns an estimate of the number of logical cores on the system.
This value can be used to help provide an estimate of how many threads to use with the
MultiThreadedEventLoopGroup
. The exact ratio between this number and the number of threads to use is a matter for the programmer, and can be determined based on the specific execution behaviour of the program.Declaration
Swift
public static var coreCount: Int { get }
Return Value
The logical core count on the system.
-
A utility function that enumerates the available network interfaces on this machine.
This function returns values that are true for a brief snapshot in time. These results can change, and the returned values will not change to reflect them. This function must be called again to get new results.
Throws
If an error is encountered while enumerating interfaces.Declaration
Swift
@available(*, deprecated, renamed: "enumerateDevices") public static func enumerateInterfaces() throws -> [NIONetworkInterface]
Return Value
An array of network interfaces available on this machine.
-
A utility function that enumerates the available network devices on this machine.
This function returns values that are true for a brief snapshot in time. These results can change, and the returned values will not change to reflect them. This function must be called again to get new results.
Throws
If an error is encountered while enumerating interfaces.Declaration
Swift
public static func enumerateDevices() throws -> [NIONetworkDevice]
Return Value
An array of network devices available on this machine.