• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reconnecting to a NetService after a stream error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reconnecting to a NetService after a stream error


  • Subject: Re: Reconnecting to a NetService after a stream error
  • From: Jeff Kelley <email@hidden>
  • Date: Thu, 4 May 2017 10:44:24 -0400

Thanks for the replies! I found the issue and it was completely unrelated. On the host side, I was stopping the service prematurely. Now that I keep the service alive for the duration of the connection, it’s working great.

On Thu, May 4, 2017 at 3:45 AM, Quinn "The Eskimo!" <email@hidden> wrote:

> My next thing to try will be to rediscover the service, using its TXT data to make sure it’s the same one, re-resolve the address, and try again.

As Marc noted, you could (and should) avoid that rediscovery by making a copy of the NSNetService.

Thanks for the tip—I was working on reconnection logic when this came in, and making a copy sounds way easier!
 

Jeff Kelley

email@hidden | @SlaunchaMan | jeffkelley.org
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Reconnecting to a NetService after a stream error (From: Marc Krochmal <email@hidden>)
 >Re: Reconnecting to a NetService after a stream error (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: Reconnecting to a NetService after a stream error
  • Next by Date: __nw_connection_get_connected_socket_block_invoke 15 Connection has no connected handler
  • Previous by thread: Re: Reconnecting to a NetService after a stream error
  • Next by thread: __nw_connection_get_connected_socket_block_invoke 15 Connection has no connected handler
  • Index(es):
    • Date
    • Thread