• 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: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Thu, 04 May 2017 08:45:52 +0100

On 3 May 2017, at 18:20, Marc Krochmal <email@hidden> wrote:

> I'm not sure why you're getting stream errors …

Indeed.  I tried this on a test app here in my office and I was able to reconnect just fine.

On 3 May 2017, at 17:38, Jeff Kelley <email@hidden> wrote:

> It seems like I can’t just call getInputStream(_:outputStream:) again on the resolved service, as doing so gives me all kinds of errors about a socket not being available.

Can you post more details about the actual error you’re getting?

> 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.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


 _______________________________________________
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

  • Follow-Ups:
    • Re: Reconnecting to a NetService after a stream error
      • From: Jeff Kelley <email@hidden>
References: 
 >Re: Reconnecting to a NetService after a stream error (From: Marc Krochmal <email@hidden>)

  • Prev by Date: Re: Reconnecting to a NetService after a stream error
  • Next by Date: Re: Reconnecting to a NetService after a stream error
  • Previous by thread: Re: Reconnecting to a NetService after a stream error
  • Next by thread: Re: Reconnecting to a NetService after a stream error
  • Index(es):
    • Date
    • Thread