I'm trying to use Network framework for a UDP connection. It works, I get traffic flowing both ways when UDP server is responding, however when the server is down and box sends ICMP port unreachable completion blocks from nw_connection_receive_message() nw_connection_receive()
are not getting called.
State and viability change handlers are also not getting called.
In my app console though I see message
[connection] nw_socket_get_input_frames [C1:1] recvmsg(fd 4, 9216 bytes) [61: Connection refused]
So somewhere inside of the API it actually gets the ICMP and knows that connection is refused, but how exactly do I get notified about this? This surely beats waiting on connection and timing out if host is nice enough to tell you that port is closed right away.
12
0
3.4k