I'm building a network client with Swift (using QUIC). I set everything up properly (I know this because I can successfully connect, send and receive streams). But I'm trying to catch connection errors.
For example if I try to connect to a totally bogus IP address, I would like to display Connecting, then ConnectionFailed
I do the following:
- create my NWMultiplexGroup descriptor
- set my appropriate NWParameters
- create my NWConnectionGroup
- set up my handlers (setReceiveHandler, newConnectionHandler) and my state update handler
- i call connection.start
When I pass a valid address to a server that is listening for the connection, all is good - in my stateUpdateHandler I get the .ready state, but I don't get any intermediate states, and if I pass it a bogus IP address, I get absolutely no callbacks to my handler
(I would have expected to get .waiting and/or .failed)
I couldn't find any quic options that I'm not doing, and the apple documentation is not helpful
Any suggestions as to what I might be missing?