I'm trying to build a TCP server with SwiftNIO. The server starts in the net, but the clients don't know the ip address. Therefore I want to start an UDP server as well and if the clients comes up, he sends a broadcast message to the net. The server will receive and answer, so that the client now knows the IP address.
Is it possible to build something like this with SwiftNIO?
                        
Yes, that's possible also there's not much support in SwiftNIO to make this easy. See below for a commented example which will send
HELLO WORLDonce a second toen0's broadcast address and port 37020.In case you want to bind to
0.0.0.0and send to255.255.255.255you can use this