Open pennstump opened 5 hours ago
To advertise you call Connection.advertise(forServiceType:name:key:)
, which hands you back an AsyncStream
of clients that want to connect. If you stop iterating over the results (for example by breaking out the loop you're consuming it with) then the cleanup for that should stop advertising–at least, in theory. Let me know if that's what you're looking for.
If not, how might you accomplish that? I have tried stopping the NWListener, but that did not stop a Server from showing up to other clients.