mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
Motivation: On Windows we have a need to transform a subnet prefix into a subnet mask when enumerating devices. This is a straightforward transformation that we can easily do in pure-Swift, so let's do that. Additionally, the functions have small enough domains that we can just exhaustively test them. Modifications: - Added functions to create SocketAddress objects from subnet prefixes. - Added exhaustive tests for those functions. - Use these functions in Windows code. Result: Correct transformations of prefixes into masks on Windows.