Hello
I am creating a UDP client in swift. For testing I have a UDP echo server set up on another computer.
I have created a GCDAsyncUdpSocket. I have called sock.bindToPort(port) and sock.beginReceiving().
I send data with sock.sendData toHost with Timeout
And I receive data with udpSocket didReceiveData fromAddress withFilterContext
This all works fine when the echo server replies with data.
However, if I shut the echo server down, I get no errors at all. I have my timeout set to 2. When I send a packet and get no reply, didReceiveData fromAddress does not fire. Neither does udpSocket didNotSendDataWithTag. I cannot find a didNotReceiveData or didNotReceiveDataWithTag.
If anyone has gotten timeouts to work for unconnected UDP sockets, how did you get them to work?