I’m working on cross platform IoT project that requires data between devices on the same WiFi network. Initially, SwiftNIO looked ideal but there appears to be no obvious way to broadcast and listen for a Bonjour service using SwiftNIO. Have I missed any obvious solution or can anyone give any pointers as to a good approach to take?
The platforms I’m using are Linux, iOS, and MacOS. Apple's Network framework isn't supported on Linux so I ruled this out. Ideally, an approach using Swift but happy to consider other approaches.
Initially, SwiftNIO looked ideal but there appears to be no obvious way to broadcast and listen for a Bonjour service using SwiftNIO. Have I missed any obvious solution or can anyone give any pointers as to a good approach to take?
Right, since you are asking about SwiftNIO
specifically I will recommend that you ask this question over on the Swift Forums under the SwiftNIO
tag. The maintainers should see this question and be able to provide further guidance from there.
Off the top of my head I do not believe that SwiftNIO
contains service discovery and service advertisement capabilities. Probably the closes you will come is the NIOMulticastChat, example, but the maintainers should be able to weigh in specifically on this matter.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com