Re: NSNetServiceBrowser when a search finds nothing
site_archiver@lists.apple.com Delivered-To: Macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=fmh65wIVoaraHgYb2kV8Y4KlyVjM+pBXgo/bShfG5Ig=; b=sWIqUm5X1Nl7rfzIyJybxZQddBtz6/h+qDYKo8d/6icotffsXIVgunZTtJRQ5QROxQ 8C5fFYkj/vQ/qTD9GwOk2lG6vQxJRrhdxlPijPnYyKKumu93MNfc8Lv0v0E1cRMMI+wg bFvJy/C9dLi733Glg5C8tdfy4V0tdxh2Gy6dcnp7FWeGCXZpX36lQ8DT0/xHdgm+Rskn H2S7Iblx/eYCTv9Bx4th7uTkBtJrRYZbFQRVlMOtud32peBBWZKfGzqIx2v9tpM6ME60 FHFo9SbqT5RzFlh3j608RiUXtR+bvv/r2Dsdan6xPxzi83UgnEuDae9825TZgtu0dLEi gS8w== IIRC, the “moreComing” parameter is basically “more coming right now”; it’s a sign to you that you shouldn’t update your UI yet because there’s going to be another call immediately after this one. Jeff Kelley SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/>
On Nov 16, 2017, at 3:38 PM, James Walker <jamesw@frameforge3d.com> wrote:
On 11/16/2017 10:58 AM, Josh Graessley wrote:
The search is never finished until you decide it is by cancelling the browse.
Bonjour sends multicasts queries with an exponential backoff, up to some maximum amount of time. When a Bonjour service is advertised/registered on an interface, a multicast is sent out as well. As long as you have that browser open, Bonjour will keep watching for a matching service to appear, either as a response to one of the multicasts it sends or through an announcement sent by a device arriving on the networking or starting the service.
The only alternative is a timeout and timeouts are bad.
Maybe I didn't make it clear enough what I'm looking for. If the delegate receives a netServiceBrowser:didFindService:moreComing: message with NO for the moreComing parameter, that means *something*, right? Sure, there could be unusual circumstances causing delayed notification about some service, and more services could come online later, but I probably have the whole story for now. That's the kind of "that's probably it for now" information I'd like to have in the case where there are no services.
On Nov 16, 2017, at 10:36 AM, James Walker <jamesw@frameforge3d.com> <mailto:jamesw@frameforge3d.com> wrote:
If I use -[NSNetServiceBrowser searchForServicesOfType:inDomain:] and there happen to be no services of the specified type, my delegate gets netServiceBrowserWillSearch:, but nothing else. How can I know when the search is finished?
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/slaunchaman%40gmail.c...
This email sent to slaunchaman@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jeff Kelley