Yep, I am. It was one of the things that I've tried that I found through another Forum Post.
I even tried settings some parameters that you actually can't set on the Listener, they were meant for a NWConnection.
But I've tried setting theses, and it didn't seem to have any effect.
params.allowLocalEndpointReuse = true // SO_REUSEADDR?
params.includePeerToPeer = true
params.acceptLocalOnly = true
listener = try NWListener(using: params, on: port)
listener?.start(queue: .main)
Post
Replies
Boosts
Views
Activity
When I tried to look for more answers, I saw a reference that there's an "automatic cooldown". Whether that is true is another question. I started to believe that it may be because there is a NWConnection and listener.cancel() was used?
Not sure if that causes issues for the socket to close, but when I look at the Client Connection, I do indeed see that trigger .cancel() kicks active connections out.