I have the following code in a macOS app:
do {
let multicast = try NWMulticastGroup(for: [.hostPort(host: "127.0.0.1", port: NWEndpoint.Port(integerLiteral: 555))])
} catch {
print(error)
return
}
However an error is thrown: POSIXErrorCode(rawValue: 22): Invalid argument
.
Am I missing something?